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 | fd53a27f991e96b5d3cfd334c61ad41def1c0af7 (patch) | |
| tree | 565e800890650179258358c9de97e7a44c5a621c /llvm/test | |
| parent | 046c47e970369dbe3e74ad4a992e7ab0512939bc (diff) | |
| download | bcm5719-llvm-fd53a27f991e96b5d3cfd334c61ad41def1c0af7.tar.gz bcm5719-llvm-fd53a27f991e96b5d3cfd334c61ad41def1c0af7.zip | |
ConstantFoldInstOperands doesn't like compares, hand it off to instsimplify instead.
Fixes PR10040.
llvm-svn: 132254
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/Transforms/InstCombine/select.ll | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/select.ll b/llvm/test/Transforms/InstCombine/select.ll index 379228512cd..4ca9bd2c07c 100644 --- a/llvm/test/Transforms/InstCombine/select.ll +++ b/llvm/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 +} |

