summaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/sub.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/InstCombine/sub.ll')
-rw-r--r--test/Transforms/InstCombine/sub.ll8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/sub.ll b/test/Transforms/InstCombine/sub.ll
index fa0322a44e80d..29bd7be2ff84c 100644
--- a/test/Transforms/InstCombine/sub.ll
+++ b/test/Transforms/InstCombine/sub.ll
@@ -272,4 +272,12 @@ define i64 @test25(i8* %P, i64 %A){
; CHECK-NEXT: ret i64
}
+define i32 @test26(i32 %x) {
+ %shl = shl i32 3, %x
+ %neg = sub i32 0, %shl
+ ret i32 %neg
+; CHECK: @test26
+; CHECK-NEXT: shl i32 -3
+; CHECK-NEXT: ret i32
+}