summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2014-12-10 21:58:15 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2014-12-10 21:58:15 +0000
commit5a7717e498bc61246375a9df0061afa27d21e322 (patch)
tree94f451a24757b23f737a19be9df22968c1d11f39 /llvm/test/Transforms/InstCombine
parent89cf6d79ebc573647c562e5f2bd6c4d11a839f8b (diff)
downloadbcm5719-llvm-5a7717e498bc61246375a9df0061afa27d21e322.tar.gz
bcm5719-llvm-5a7717e498bc61246375a9df0061afa27d21e322.zip
ConstantFold, InstSimplify: undef >>a x can be either -1 or 0, choose 0
Zero is usually a nicer constant to have than -1. llvm-svn: 223969
Diffstat (limited to 'llvm/test/Transforms/InstCombine')
-rw-r--r--llvm/test/Transforms/InstCombine/shift.ll4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/test/Transforms/InstCombine/shift.ll b/llvm/test/Transforms/InstCombine/shift.ll
index 1acc0a56430..0b5b5deb68c 100644
--- a/llvm/test/Transforms/InstCombine/shift.ll
+++ b/llvm/test/Transforms/InstCombine/shift.ll
@@ -84,14 +84,14 @@ define <4 x i32> @test5a_non_splat_vector(<4 x i32> %A) {
define i32 @test5b() {
; CHECK-LABEL: @test5b(
-; CHECK: ret i32 -1
+; CHECK: ret i32 0
%B = ashr i32 undef, 2 ;; top two bits must be equal, so not undef
ret i32 %B
}
define i32 @test5b2(i32 %A) {
; CHECK-LABEL: @test5b2(
-; CHECK: ret i32 -1
+; CHECK: ret i32 0
%B = ashr i32 undef, %A ;; top %A bits must be equal, so not undef
ret i32 %B
}
OpenPOWER on IntegriCloud