summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine/signext.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-02-10 05:36:31 +0000
committerChris Lattner <sabre@nondot.org>2011-02-10 05:36:31 +0000
commit6b657aed3365d6bf77b0eda4020eeea5661535e7 (patch)
tree0378c26d05547d7121fbc43a635ac9919bd3079f /llvm/test/Transforms/InstCombine/signext.ll
parent98457101fc21f519134d877259a17bf36894bdfe (diff)
downloadbcm5719-llvm-6b657aed3365d6bf77b0eda4020eeea5661535e7.tar.gz
bcm5719-llvm-6b657aed3365d6bf77b0eda4020eeea5661535e7.zip
Enhance a bunch of transformations in instcombine to start generating
exact/nsw/nuw shifts and have instcombine infer them when it can prove that the relevant properties are true for a given shift without them. Also, a variety of refactoring to use the new patternmatch logic thrown in for good luck. I believe that this takes care of a bunch of related code quality issues attached to PR8862. llvm-svn: 125267
Diffstat (limited to 'llvm/test/Transforms/InstCombine/signext.ll')
-rw-r--r--llvm/test/Transforms/InstCombine/signext.ll12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/test/Transforms/InstCombine/signext.ll b/llvm/test/Transforms/InstCombine/signext.ll
index 49384d6275e..ecee9830cd5 100644
--- a/llvm/test/Transforms/InstCombine/signext.ll
+++ b/llvm/test/Transforms/InstCombine/signext.ll
@@ -9,7 +9,7 @@ define i32 @test1(i32 %x) {
ret i32 %tmp.3
; CHECK: @test1
; CHECK: %sext = shl i32 %x, 16
-; CHECK: %tmp.3 = ashr i32 %sext, 16
+; CHECK: %tmp.3 = ashr exact i32 %sext, 16
; CHECK: ret i32 %tmp.3
}
@@ -20,7 +20,7 @@ define i32 @test2(i32 %x) {
ret i32 %tmp.3
; CHECK: @test2
; CHECK: %sext = shl i32 %x, 16
-; CHECK: %tmp.3 = ashr i32 %sext, 16
+; CHECK: %tmp.3 = ashr exact i32 %sext, 16
; CHECK: ret i32 %tmp.3
}
@@ -51,7 +51,7 @@ define i32 @test5(i32 %x) {
ret i32 %tmp.3
; CHECK: @test5
; CHECK: %sext = shl i32 %x, 24
-; CHECK: %tmp.3 = ashr i32 %sext, 24
+; CHECK: %tmp.3 = ashr exact i32 %sext, 24
; CHECK: ret i32 %tmp.3
}
@@ -61,7 +61,7 @@ define i32 @test6(i32 %x) {
ret i32 %tmp.4
; CHECK: @test6
; CHECK: %tmp.2 = shl i32 %x, 16
-; CHECK: %tmp.4 = ashr i32 %tmp.2, 16
+; CHECK: %tmp.4 = ashr exact i32 %tmp.2, 16
; CHECK: ret i32 %tmp.4
}
@@ -82,6 +82,6 @@ entry:
%sub = add i32 %xor, -67108864 ; <i32> [#uses=1]
ret i32 %sub
; CHECK: @test8
-; CHECK: %sub = ashr i32 %x, 5
-; CHECK: ret i32 %sub
+; CHECK: %shr = ashr i32 %x, 5
+; CHECK: ret i32 %shr
}
OpenPOWER on IntegriCloud