From dfe91b47a82dab66327c8f85f003a8bb54916c8c Mon Sep 17 00:00:00 2001 From: Guozhi Wei Date: Wed, 3 Aug 2016 21:43:51 +0000 Subject: [PPC] Handling CallInst in PPCBoolRetToInt This patch fixes pr25548. Current implementation of PPCBoolRetToInt doesn't handle CallInst correctly, so it failed to do the intended optimization when there is a CallInst with parameters. This patch fixed that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277655 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/PowerPC/BoolRetToIntTest.ll | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test/CodeGen/PowerPC/BoolRetToIntTest.ll') diff --git a/test/CodeGen/PowerPC/BoolRetToIntTest.ll b/test/CodeGen/PowerPC/BoolRetToIntTest.ll index a7b79789b4c..4a0966b2859 100644 --- a/test/CodeGen/PowerPC/BoolRetToIntTest.ll +++ b/test/CodeGen/PowerPC/BoolRetToIntTest.ll @@ -198,6 +198,8 @@ declare zeroext i1 @return_i1() define zeroext i1 @call_test() { ; CHECK: [[REG:%.+]] = call i1 %result = call i1 @return_i1() +; CHECK: [[REG:%.+]] = zext i1 {{%.+}} to i32 +; CHECK: [[REG:%.+]] = trunc i32 {{%.+}} to i1 ; CHECK: ret i1 [[REG]] ret i1 %result -} \ No newline at end of file +} -- cgit v1.2.3