diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-05-28 10:16:58 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-05-28 10:16:58 +0000 |
commit | 2c5cc6887412597518ca4a585625b0af1ea71622 (patch) | |
tree | 49bb70c0d759e22824692f1c43fad96ef2686716 /test/Transforms/InstCombine/select.ll | |
parent | d7c10862016939c9850cadfe5e1c35513c0adf28 (diff) | |
download | external_llvm-2c5cc6887412597518ca4a585625b0af1ea71622.zip external_llvm-2c5cc6887412597518ca4a585625b0af1ea71622.tar.gz external_llvm-2c5cc6887412597518ca4a585625b0af1ea71622.tar.bz2 |
ConstantFoldInstOperands doesn't like compares, hand it off to instsimplify instead.
Fixes PR10040.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132254 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/select.ll')
-rw-r--r-- | test/Transforms/InstCombine/select.ll | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/select.ll b/test/Transforms/InstCombine/select.ll index 3792285..4ca9bd2 100644 --- a/test/Transforms/InstCombine/select.ll +++ b/test/Transforms/InstCombine/select.ll @@ -789,3 +789,13 @@ define i32 @test59(i32 %x, i32 %y) nounwind { ; CHECK-NEXT: and i32 %x, %y ; CHECK-NEXT: ret } + +define i1 @test60(i32 %x, i1* %y) nounwind { + %cmp = icmp eq i32 %x, 0 + %load = load i1* %y, align 1 + %cmp1 = icmp slt i32 %x, 1 + %sel = select i1 %cmp, i1 %load, i1 %cmp1 + ret i1 %sel +; CHECK: @test60 +; CHECK: select +} |