diff options
author | Craig Topper <craig.topper@gmail.com> | 2012-12-19 06:12:28 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2012-12-19 06:12:28 +0000 |
commit | 40b4a81ab007c11c2d4227b4f6a949720ba2adff (patch) | |
tree | 743ffa2ef2b7a318b9e3db2a08147fadd44c7bdb /test/CodeGen/X86/cmp.ll | |
parent | 95f475f2ecc5fd0f1db2f5c249723010abc5259e (diff) | |
download | external_llvm-40b4a81ab007c11c2d4227b4f6a949720ba2adff.zip external_llvm-40b4a81ab007c11c2d4227b4f6a949720ba2adff.tar.gz external_llvm-40b4a81ab007c11c2d4227b4f6a949720ba2adff.tar.bz2 |
Teach SimplifySetCC that comparing AssertZext i1 against a constant 1 can be rewritten as a compare against a constant 0 with the opposite condition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170495 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/cmp.ll')
-rw-r--r-- | test/CodeGen/X86/cmp.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGen/X86/cmp.ll b/test/CodeGen/X86/cmp.ll index eb06327..1855fe2 100644 --- a/test/CodeGen/X86/cmp.ll +++ b/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() |