summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/cmp.ll
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2012-12-19 06:12:28 +0000
committerCraig Topper <craig.topper@gmail.com>2012-12-19 06:12:28 +0000
commit63f5921776c2b0311f59e7768b475cff566c9d2d (patch)
treeb243422d5e946180192fa0b1235ca2715e668d7f /llvm/test/CodeGen/X86/cmp.ll
parent3aad762d1d09feceaa1ee41f7f42cdb7a7b0c96f (diff)
downloadbcm5719-llvm-63f5921776c2b0311f59e7768b475cff566c9d2d.tar.gz
bcm5719-llvm-63f5921776c2b0311f59e7768b475cff566c9d2d.zip
Teach SimplifySetCC that comparing AssertZext i1 against a constant 1 can be rewritten as a compare against a constant 0 with the opposite condition.
llvm-svn: 170495
Diffstat (limited to 'llvm/test/CodeGen/X86/cmp.ll')
-rw-r--r--llvm/test/CodeGen/X86/cmp.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/cmp.ll b/llvm/test/CodeGen/X86/cmp.ll
index eb06327f55a..1855fe2fb89 100644
--- a/llvm/test/CodeGen/X86/cmp.ll
+++ b/llvm/test/CodeGen/X86/cmp.ll
@@ -151,3 +151,18 @@ entry:
%conv = zext i1 %cmp to i32
ret i32 %conv
}
+
+define i32 @test12() uwtable ssp {
+; CHECK: test12:
+; CHECK: testb
+ %1 = call zeroext i1 @test12b()
+ br i1 %1, label %2, label %3
+
+; <label>:2 ; preds = %0
+ ret i32 1
+
+; <label>:3 ; preds = %0
+ ret i32 2
+}
+
+declare zeroext i1 @test12b()
OpenPOWER on IntegriCloud