[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.
llvm-svn: 277655
diff --git a/llvm/test/CodeGen/PowerPC/BoolRetToIntTest.ll b/llvm/test/CodeGen/PowerPC/BoolRetToIntTest.ll
index a7b7978..4a0966b 100644
--- a/llvm/test/CodeGen/PowerPC/BoolRetToIntTest.ll
+++ b/llvm/test/CodeGen/PowerPC/BoolRetToIntTest.ll
@@ -198,6 +198,8 @@
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
+}