diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2011-03-27 19:51:23 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2011-03-27 19:51:23 +0000 |
commit | 675619ca38adf7d5b019e009add88bcac699bf88 (patch) | |
tree | c4d827b23e1babc14708fc6d6cb767a7b2da3618 /test/Transforms/InstCombine | |
parent | d655e6e9dc0d21c3a2d76494dec255bb027572ae (diff) | |
download | external_llvm-675619ca38adf7d5b019e009add88bcac699bf88.zip external_llvm-675619ca38adf7d5b019e009add88bcac699bf88.tar.gz external_llvm-675619ca38adf7d5b019e009add88bcac699bf88.tar.bz2 |
Teach the transformation that moves binary operators around selects to preserve
the subclass optional data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128388 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine')
-rw-r--r-- | test/Transforms/InstCombine/select.ll | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/select.ll b/test/Transforms/InstCombine/select.ll index 40237ae..3925907 100644 --- a/test/Transforms/InstCombine/select.ll +++ b/test/Transforms/InstCombine/select.ll @@ -737,3 +737,15 @@ define i32 @test54(i32 %X, i32 %Y) { ; CHECK: zext ; CHECK: ret } + +define i1 @test55(i1 %X, i32 %Y, i32 %Z) { + %A = ashr exact i32 %Y, %Z + %B = select i1 %X, i32 %Y, i32 %A + %C = icmp eq i32 %B, 0 + ret i1 %C +; CHECK: @test55 +; CHECK-NOT: ashr +; CHECK-NOT: select +; CHECK: icmp eq +; CHECK: ret i1 +} |