diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-04 06:03:59 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-04 06:03:59 +0000 |
commit | e4412c1f0b636980d77a518b76e94559830eeaed (patch) | |
tree | c9a87c184827577f46b5ab6a46bea23b70ee068b /test/Transforms | |
parent | d0592d3be68e60a77c0bb98ad4861648e16e467c (diff) | |
download | external_llvm-e4412c1f0b636980d77a518b76e94559830eeaed.zip external_llvm-e4412c1f0b636980d77a518b76e94559830eeaed.tar.gz external_llvm-e4412c1f0b636980d77a518b76e94559830eeaed.tar.bz2 |
implement an instcombine xform needed by clang's codegen
on the example in PR4216. This doesn't trigger in the testsuite,
so I'd really appreciate someone scrutinizing the logic for
correctness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92458 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r-- | test/Transforms/InstCombine/or.ll | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/or.ll b/test/Transforms/InstCombine/or.ll index 44228ba..822dfb3 100644 --- a/test/Transforms/InstCombine/or.ll +++ b/test/Transforms/InstCombine/or.ll @@ -307,3 +307,16 @@ define i1 @test29(i32* %A, i32* %B) { ; CHECK: ret i1 } +; PR4216 +define i32 @test30(i32 %A) { +entry: + %B = or i32 %A, 32962 + %C = and i32 %A, -65536 + %D = and i32 %B, 40186 + %E = or i32 %D, %C + ret i32 %E +; CHECK: @test30 +; CHECK: %B = or i32 %A, 32962 +; CHECK: %E = and i32 %B, -25350 +; CHECK: ret i32 %E +} |