summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/fast-isel-x86-64.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-04-19 04:42:38 +0000
committerChris Lattner <sabre@nondot.org>2011-04-19 04:42:38 +0000
commitd7f7c939142f4a178d58a01fd8ce7b61c11b5d1b (patch)
tree2ad1f740542f87922020c2ef6a9ffe1546b63096 /llvm/test/CodeGen/X86/fast-isel-x86-64.ll
parentfd07f856052073334fdfb6152720e304223f9172 (diff)
downloadbcm5719-llvm-d7f7c939142f4a178d58a01fd8ce7b61c11b5d1b.tar.gz
bcm5719-llvm-d7f7c939142f4a178d58a01fd8ce7b61c11b5d1b.zip
Handle i1/i8/i16 constant integer arguments to calls by prepromoting them.
Before we would bail out on i1 arguments all together, now we just bail on non-constant ones. Also, we used to emit extraneous code. e.g. test12 was: movb $0, %al movzbl %al, %edi callq _test12 and test13 was: movb $0, %al xorl %edi, %edi movb %al, 7(%rsp) callq _test13f Now we get: movl $0, %edi callq _test12 and: movl $0, %edi callq _test13f llvm-svn: 129751
Diffstat (limited to 'llvm/test/CodeGen/X86/fast-isel-x86-64.ll')
-rw-r--r--llvm/test/CodeGen/X86/fast-isel-x86-64.ll13
1 files changed, 12 insertions, 1 deletions
diff --git a/llvm/test/CodeGen/X86/fast-isel-x86-64.ll b/llvm/test/CodeGen/X86/fast-isel-x86-64.ll
index 0c289e37975..2e6bafe0720 100644
--- a/llvm/test/CodeGen/X86/fast-isel-x86-64.ll
+++ b/llvm/test/CodeGen/X86/fast-isel-x86-64.ll
@@ -143,6 +143,17 @@ if.end: ; preds = %if.then, %entry
; CHECK: test12:
; CHECK: testb $1,
; CHECK-NEXT: je L
-; CHECK-NEXT: movb $0, %al
+; CHECK-NEXT: movl $0, %edi
+; CHECK-NEXT: callq
+}
+
+declare void @test13f(i1 %X)
+
+define void @test13() nounwind {
+ call void @test13f(i1 0)
+ ret void
+; CHECK: test13:
+; CHECK: movl $0, %edi
+; CHECK-NEXT: callq
}
OpenPOWER on IntegriCloud