diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2009-03-17 23:43:59 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2009-03-17 23:43:59 +0000 |
commit | 152932b71c488a6522c541f847eb3081cffb3793 (patch) | |
tree | 59aedfa7e60b5f3579fd7a1b142354c2d3f72a7d /test/CodeGen/X86 | |
parent | b372c1114c1eeffbd1a3f6ddc5d33e77564bfee2 (diff) | |
download | external_llvm-152932b71c488a6522c541f847eb3081cffb3793.zip external_llvm-152932b71c488a6522c541f847eb3081cffb3793.tar.gz external_llvm-152932b71c488a6522c541f847eb3081cffb3793.tar.bz2 |
Don't force promotion of return arguments on the callee.
Some architectures (like x86) don't require it.
This fixes bug 3779.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67132 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86')
-rw-r--r-- | test/CodeGen/X86/2007-08-10-SignExtSubreg.ll | 2 | ||||
-rw-r--r-- | test/CodeGen/X86/20090313-signext.ll | 18 | ||||
-rw-r--r-- | test/CodeGen/X86/const-select.ll | 2 | ||||
-rw-r--r-- | test/CodeGen/X86/isel-sink2.ll | 5 | ||||
-rw-r--r-- | test/CodeGen/X86/sext-trunc.ll | 3 | ||||
-rw-r--r-- | test/CodeGen/X86/tls11.ll | 2 | ||||
-rw-r--r-- | test/CodeGen/X86/tls12.ll | 2 |
7 files changed, 27 insertions, 7 deletions
diff --git a/test/CodeGen/X86/2007-08-10-SignExtSubreg.ll b/test/CodeGen/X86/2007-08-10-SignExtSubreg.ll index b62d2c6..ffb1e83 100644 --- a/test/CodeGen/X86/2007-08-10-SignExtSubreg.ll +++ b/test/CodeGen/X86/2007-08-10-SignExtSubreg.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -march=x86 | grep {movsbl} +; RUN: llvm-as < %s | llc -march=x86 | not grep {movsbl} @X = global i32 0 ; <i32*> [#uses=1] diff --git a/test/CodeGen/X86/20090313-signext.ll b/test/CodeGen/X86/20090313-signext.ll new file mode 100644 index 0000000..d41b245 --- /dev/null +++ b/test/CodeGen/X86/20090313-signext.ll @@ -0,0 +1,18 @@ +; RUN: llvm-as < %s | llc -march=x86-64 > %t +; RUN: grep {movswl %ax, %edi} %t +; RUN: grep {movw x(%rip), %ax} %t + +@x = common global i16 0 + +define signext i16 @f() nounwind { +entry: + %0 = tail call signext i16 @h() nounwind + %1 = sext i16 %0 to i32 + tail call void @g(i32 %1) nounwind + %2 = load i16* @x, align 2 + ret i16 %2 +} + +declare signext i16 @h() + +declare void @g(i32) diff --git a/test/CodeGen/X86/const-select.ll b/test/CodeGen/X86/const-select.ll index 6e3156b..8cdf4ac 100644 --- a/test/CodeGen/X86/const-select.ll +++ b/test/CodeGen/X86/const-select.ll @@ -10,7 +10,7 @@ entry: ret float %iftmp.0.0 } -; RUN: llvm-as < %s | llc | grep {movsbl.*(%e.x,%e.x,4), %eax} +; RUN: llvm-as < %s | llc | grep {movb.*(%e.x,%e.x,4), %al} define signext i8 @test(i8* nocapture %P, double %F) nounwind readonly { entry: %0 = fcmp olt double %F, 4.200000e+01 ; <i1> [#uses=1] diff --git a/test/CodeGen/X86/isel-sink2.ll b/test/CodeGen/X86/isel-sink2.ll index d8e27e9..9d9c747 100644 --- a/test/CodeGen/X86/isel-sink2.ll +++ b/test/CodeGen/X86/isel-sink2.ll @@ -1,5 +1,6 @@ -; RUN: llvm-as < %s | llc -march=x86 | grep {movzbl.7(%...)} -; RUN: llvm-as < %s | llc -march=x86 | not grep leal +; RUN: llvm-as < %s | llc -march=x86 > %t +; RUN: grep {movb.7(%...)} %t +; RUN: not grep leal %t define i8 @test(i32 *%P) nounwind { %Q = getelementptr i32* %P, i32 1 diff --git a/test/CodeGen/X86/sext-trunc.ll b/test/CodeGen/X86/sext-trunc.ll index 97b4666..df40156 100644 --- a/test/CodeGen/X86/sext-trunc.ll +++ b/test/CodeGen/X86/sext-trunc.ll @@ -1,5 +1,6 @@ ; RUN: llvm-as < %s | llc -march=x86 > %t -; RUN: grep movsbl %t +; RUN: grep movb %t +; RUN: not grep movsbl %t ; RUN: not grep movz %t ; RUN: not grep and %t diff --git a/test/CodeGen/X86/tls11.ll b/test/CodeGen/X86/tls11.ll index 32d0a12..f8543c0 100644 --- a/test/CodeGen/X86/tls11.ll +++ b/test/CodeGen/X86/tls11.ll @@ -1,5 +1,5 @@ ; RUN: llvm-as < %s | llc -march=x86 -mtriple=i386-linux-gnu > %t -; RUN: grep {movzwl %gs:i@NTPOFF, %eax} %t +; RUN: grep {movw %gs:i@NTPOFF, %ax} %t @i = thread_local global i16 15 diff --git a/test/CodeGen/X86/tls12.ll b/test/CodeGen/X86/tls12.ll index c6f766d..17ea996 100644 --- a/test/CodeGen/X86/tls12.ll +++ b/test/CodeGen/X86/tls12.ll @@ -1,5 +1,5 @@ ; RUN: llvm-as < %s | llc -march=x86 -mtriple=i386-linux-gnu > %t -; RUN: grep {movzbl %gs:i@NTPOFF, %eax} %t +; RUN: grep {movb %gs:i@NTPOFF, %al} %t @i = thread_local global i8 15 |