From: David Bolvansky Date: Fri, 21 Jun 2019 16:14:13 +0000 (+0000) Subject: [NFC] Added more tests for D63652 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=50b6b867633035fddb76fb2b3fa8c54bffce3f8a;p=llvm [NFC] Added more tests for D63652 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364069 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Transforms/InstCombine/shl-sub.ll b/test/Transforms/InstCombine/shl-sub.ll index d22e5a706b7..43ba548e92f 100644 --- a/test/Transforms/InstCombine/shl-sub.ll +++ b/test/Transforms/InstCombine/shl-sub.ll @@ -148,5 +148,38 @@ 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( +; CHECK-NEXT: [[S:%.*]] = sub <3 x i64> , [[X:%.*]] +; CHECK-NEXT: [[R:%.*]] = shl <3 x i64> , [[S]] +; CHECK-NEXT: ret <3 x i64> [[R]] +; + %s = sub <3 x i64> , %x + %r = shl <3 x i64> , %s + 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> , [[X:%.*]] +; CHECK-NEXT: [[R:%.*]] = shl <3 x i64> , [[S]] +; CHECK-NEXT: ret <3 x i64> [[R]] +; + %s = sub <3 x i64> , %x + %r = shl <3 x i64> , %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( +; CHECK-NEXT: [[S:%.*]] = sub <3 x i64> , [[X:%.*]] +; CHECK-NEXT: [[R:%.*]] = shl <3 x i64> , [[S]] +; CHECK-NEXT: ret <3 x i64> [[R]] +; + %s = sub <3 x i64> , %x + %r = shl <3 x i64> , %s + ret <3 x i64> %r +} + declare void @use(i32)