summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms
diff options
context:
space:
mode:
authorDavid Bolvansky <david.bolvansky@gmail.com>2019-06-21 17:51:18 +0000
committerDavid Bolvansky <david.bolvansky@gmail.com>2019-06-21 17:51:18 +0000
commit2441a4074c19257849b54be9b5e2a5c0ea87a48c (patch)
tree93489c899360940375445d47c98f4572782dc1d7 /llvm/test/Transforms
parentf483617256847d8e5ff94cd69be0ecf1d55842c5 (diff)
downloadbcm5719-llvm-2441a4074c19257849b54be9b5e2a5c0ea87a48c.tar.gz
bcm5719-llvm-2441a4074c19257849b54be9b5e2a5c0ea87a48c.zip
[NFC] Update shl-sub tests
llvm-svn: 364083
Diffstat (limited to 'llvm/test/Transforms')
-rw-r--r--llvm/test/Transforms/InstCombine/shl-sub.ll29
1 files changed, 14 insertions, 15 deletions
diff --git a/llvm/test/Transforms/InstCombine/shl-sub.ll b/llvm/test/Transforms/InstCombine/shl-sub.ll
index fc2939e6650..4845474695d 100644
--- a/llvm/test/Transforms/InstCombine/shl-sub.ll
+++ b/llvm/test/Transforms/InstCombine/shl-sub.ll
@@ -54,6 +54,16 @@ define <2 x i64> @shl_sub_i64_vec(<2 x i64> %x) {
ret <2 x i64> %r
}
+define <3 x i64> @shl_sub_i64_vec_undef(<3 x i64> %x) {
+; CHECK-LABEL: @shl_sub_i64_vec_undef(
+; CHECK-NEXT: [[R:%.*]] = lshr <3 x i64> <i64 -9223372036854775808, i64 -9223372036854775808, i64 -9223372036854775808>, [[X:%.*]]
+; CHECK-NEXT: ret <3 x i64> [[R]]
+;
+ %s = sub <3 x i64> <i64 63, i64 63, i64 63>, %x
+ %r = shl <3 x i64> <i64 1, i64 undef, i64 1>, %s
+ ret <3 x i64> %r
+}
+
; Negative tests
define i32 @shl_bad_sub_i32(i32 %x) {
@@ -144,8 +154,8 @@ define <2 x i64> @bad_shl_sub_i64_vec(<2 x i64> %x) {
ret <2 x i64> %r
}
-define <3 x i64> @shl_sub_i64_vec_undef0(<3 x i64> %x) {
-; CHECK-LABEL: @shl_sub_i64_vec_undef0(
+define <3 x i64> @shl_sub_i64_vec_undef_bad(<3 x i64> %x) {
+; CHECK-LABEL: @shl_sub_i64_vec_undef_bad(
; CHECK-NEXT: [[S:%.*]] = sub <3 x i64> <i64 63, i64 undef, i64 63>, [[X:%.*]]
; CHECK-NEXT: [[R:%.*]] = shl <3 x i64> <i64 1, i64 1, i64 1>, [[S]]
; CHECK-NEXT: ret <3 x i64> [[R]]
@@ -155,19 +165,8 @@ define <3 x i64> @shl_sub_i64_vec_undef0(<3 x i64> %x) {
ret <3 x i64> %r
}
-define <3 x i64> @shl_sub_i64_vec_undef1(<3 x i64> %x) {
-; CHECK-LABEL: @shl_sub_i64_vec_undef1(
-; CHECK-NEXT: [[S:%.*]] = sub <3 x i64> <i64 63, i64 undef, i64 63>, [[X:%.*]]
-; CHECK-NEXT: [[R:%.*]] = shl <3 x i64> <i64 1, i64 undef, i64 1>, [[S]]
-; CHECK-NEXT: ret <3 x i64> [[R]]
-;
- %s = sub <3 x i64> <i64 63, i64 undef, i64 63>, %x
- %r = shl <3 x i64> <i64 1, i64 undef, i64 1>, %s
- ret <3 x i64> %r
-}
-
-define <3 x i64> @shl_sub_i64_vec_undef2(<3 x i64> %x) {
-; CHECK-LABEL: @shl_sub_i64_vec_undef2(
+define <3 x i64> @shl_sub_i64_vec_undef_bad2(<3 x i64> %x) {
+; CHECK-LABEL: @shl_sub_i64_vec_undef_bad2(
; CHECK-NEXT: [[S:%.*]] = sub <3 x i64> <i64 63, i64 undef, i64 63>, [[X:%.*]]
; CHECK-NEXT: [[R:%.*]] = shl <3 x i64> <i64 1, i64 undef, i64 1>, [[S]]
; CHECK-NEXT: ret <3 x i64> [[R]]
OpenPOWER on IntegriCloud