]> granicus.if.org Git - llvm/commitdiff
[InstCombine] fix typo in test; NFC
authorSanjay Patel <spatel@rotateright.com>
Mon, 8 Jul 2019 15:38:03 +0000 (15:38 +0000)
committerSanjay Patel <spatel@rotateright.com>
Mon, 8 Jul 2019 15:38:03 +0000 (15:38 +0000)
I added this test in rL365325, but didn't mean to create an undef insert.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365333 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/InstCombine/insert-extract-shuffle.ll

index e6fc01296148f3f3dc64559eaadd1e50abd4260b..f3cb6ff9fae4408236d9b90c549762ecdaaa1f39 100644 (file)
@@ -438,10 +438,12 @@ define <4 x float> @insert_nonzero_index_splat(float %x) {
 
 define <3 x double> @insert_nonzero_index_splat_narrow(double %x) {
 ; CHECK-LABEL: @insert_nonzero_index_splat_narrow(
-; CHECK-NEXT:    ret <3 x double> undef
+; CHECK-NEXT:    [[XV:%.*]] = insertelement <4 x double> undef, double [[X:%.*]], i32 3
+; CHECK-NEXT:    [[SPLAT:%.*]] = shufflevector <4 x double> [[XV]], <4 x double> undef, <3 x i32> <i32 3, i32 undef, i32 3>
+; CHECK-NEXT:    ret <3 x double> [[SPLAT]]
 ;
-  %xv = insertelement <4 x double> undef, double %x, i32 4
-  %splat = shufflevector <4 x double> %xv, <4 x double> undef, <3 x i32> <i32 4, i32 undef, i32 4>
+  %xv = insertelement <4 x double> undef, double %x, i32 3
+  %splat = shufflevector <4 x double> %xv, <4 x double> undef, <3 x i32> <i32 3, i32 undef, i32 3>
   ret <3 x double> %splat
 }