From d7f7c939142f4a178d58a01fd8ce7b61c11b5d1b Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 19 Apr 2011 04:42:38 +0000 Subject: 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 --- llvm/test/CodeGen/X86/fast-isel-x86-64.ll | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'llvm/test/CodeGen/X86/fast-isel-x86-64.ll') 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 } -- cgit v1.2.3