diff options
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/Transforms/InstCombine/sub.ll | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/sub.ll b/llvm/test/Transforms/InstCombine/sub.ll index fa0322a44e8..29bd7be2ff8 100644 --- a/llvm/test/Transforms/InstCombine/sub.ll +++ b/llvm/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 +} |