diff options
author | Shuxin Yang <shuxin.llvm@gmail.com> | 2012-12-12 00:29:03 +0000 |
---|---|---|
committer | Shuxin Yang <shuxin.llvm@gmail.com> | 2012-12-12 00:29:03 +0000 |
commit | 5f70c2e934c8cf7814fc047f4824ac89b35dd72d (patch) | |
tree | 3f4df3e7ca234645eda5b0d4143fb104a59016a1 /test/Transforms/InstCombine/shift.ll | |
parent | c244f381768e2e6ab9daa807adbee18de4756a07 (diff) | |
download | llvm-5f70c2e934c8cf7814fc047f4824ac89b35dd72d.tar.gz llvm-5f70c2e934c8cf7814fc047f4824ac89b35dd72d.tar.bz2 llvm-5f70c2e934c8cf7814fc047f4824ac89b35dd72d.tar.xz |
- Fix a problematic way in creating all-the-1 APInt.
- Propagate "exact" bit of [l|a]shr instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169942 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/shift.ll')
-rw-r--r-- | test/Transforms/InstCombine/shift.ll | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/shift.ll b/test/Transforms/InstCombine/shift.ll index 32867761a3..41f8aa9ee8 100644 --- a/test/Transforms/InstCombine/shift.ll +++ b/test/Transforms/InstCombine/shift.ll @@ -735,3 +735,13 @@ define i32 @test61(i32 %x) { ; CHECK: @test61 ; CHECK: ashr i32 %x, 4 } + +; propagate "exact" trait +define i32 @test62(i32 %x) { + %shr = ashr exact i32 %x, 4 + %shl = shl i32 %shr, 1 + %or = or i32 %shl, 1 + ret i32 %or +; CHECK: @test62 +; CHECK: ashr exact i32 %x, 3 +} |