@@ -58,15 +58,10 @@ define <4 x double> @src_ins3_v4f64_ext0_v2f64(<4 x double> %a, <2 x double> %b)
5858}
5959
6060define <4 x double > @src_ins0_v4f64_ext1_v2f64 (<4 x double > %a , <2 x double > %b ) #0 {
61- ; SSE-LABEL: @src_ins0_v4f64_ext1_v2f64(
62- ; SSE-NEXT: [[TMP1:%.*]] = shufflevector <2 x double> [[B:%.*]], <2 x double> poison, <4 x i32> <i32 poison, i32 1, i32 poison, i32 poison>
63- ; SSE-NEXT: [[INS:%.*]] = shufflevector <4 x double> [[TMP1]], <4 x double> poison, <4 x i32> <i32 1, i32 poison, i32 poison, i32 poison>
64- ; SSE-NEXT: ret <4 x double> [[INS]]
65- ;
66- ; AVX-LABEL: @src_ins0_v4f64_ext1_v2f64(
67- ; AVX-NEXT: [[EXT:%.*]] = extractelement <2 x double> [[B:%.*]], i32 1
68- ; AVX-NEXT: [[INS:%.*]] = insertelement <4 x double> poison, double [[EXT]], i32 0
69- ; AVX-NEXT: ret <4 x double> [[INS]]
61+ ; CHECK-LABEL: @src_ins0_v4f64_ext1_v2f64(
62+ ; CHECK-NEXT: [[EXT:%.*]] = extractelement <2 x double> [[B:%.*]], i32 1
63+ ; CHECK-NEXT: [[INS:%.*]] = insertelement <4 x double> poison, double [[EXT]], i32 0
64+ ; CHECK-NEXT: ret <4 x double> [[INS]]
7065;
7166 %ext = extractelement <2 x double > %b , i32 1
7267 %ins = insertelement <4 x double > poison, double %ext , i32 0
@@ -85,10 +80,15 @@ define <4 x double> @src_ins1_v4f64_ext1_v2f64(<4 x double> %a, <2 x double> %b)
8580}
8681
8782define <4 x double > @src_ins2_v4f64_ext1_v2f64 (<4 x double > %a , <2 x double > %b ) #0 {
88- ; CHECK-LABEL: @src_ins2_v4f64_ext1_v2f64(
89- ; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <2 x double> [[B:%.*]], <2 x double> poison, <4 x i32> <i32 poison, i32 1, i32 poison, i32 poison>
90- ; CHECK-NEXT: [[INS:%.*]] = shufflevector <4 x double> [[TMP1]], <4 x double> poison, <4 x i32> <i32 poison, i32 poison, i32 1, i32 poison>
91- ; CHECK-NEXT: ret <4 x double> [[INS]]
83+ ; SSE-LABEL: @src_ins2_v4f64_ext1_v2f64(
84+ ; SSE-NEXT: [[EXT:%.*]] = extractelement <2 x double> [[B:%.*]], i32 1
85+ ; SSE-NEXT: [[INS:%.*]] = insertelement <4 x double> poison, double [[EXT]], i32 2
86+ ; SSE-NEXT: ret <4 x double> [[INS]]
87+ ;
88+ ; AVX-LABEL: @src_ins2_v4f64_ext1_v2f64(
89+ ; AVX-NEXT: [[TMP1:%.*]] = shufflevector <2 x double> [[B:%.*]], <2 x double> poison, <4 x i32> <i32 poison, i32 1, i32 poison, i32 poison>
90+ ; AVX-NEXT: [[INS:%.*]] = shufflevector <4 x double> [[TMP1]], <4 x double> poison, <4 x i32> <i32 poison, i32 poison, i32 1, i32 poison>
91+ ; AVX-NEXT: ret <4 x double> [[INS]]
9292;
9393 %ext = extractelement <2 x double > %b , i32 1
9494 %ins = insertelement <4 x double > poison, double %ext , i32 2
@@ -119,8 +119,8 @@ define <2 x double> @src_ins0_v2f64_ext0_v4f64(<2 x double> %a, <4 x double> %b)
119119
120120define <2 x double > @src_ins0_v2f64_ext1_v4f64 (<2 x double > %a , <4 x double > %b ) {
121121; CHECK-LABEL: @src_ins0_v2f64_ext1_v4f64(
122- ; CHECK-NEXT: [[EXT :%.*]] = extractelement <4 x double> [[B:%.*]], i32 1
123- ; CHECK-NEXT: [[INS:%.*]] = insertelement <2 x double> poison, double [[EXT ]], i32 0
122+ ; CHECK-NEXT: [[TMP1 :%.*]] = shufflevector <4 x double> [[B:%.*]], <4 x double> poison, <2 x i32> <i32 poison, i32 1>
123+ ; CHECK-NEXT: [[INS:%.*]] = shufflevector <2 x double> [[TMP1 ]], <2 x double> poison, <2 x i32> <i32 1, i32 poison>
124124; CHECK-NEXT: ret <2 x double> [[INS]]
125125;
126126 %ext = extractelement <4 x double > %b , i32 1
@@ -152,8 +152,8 @@ define <2 x double> @src_ins0_v2f64_ext3_v4f64(<2 x double> %a, <4 x double> %b)
152152
153153define <2 x double > @src_ins1_v2f64_ext0_v4f64 (<2 x double > %a , <4 x double > %b ) {
154154; CHECK-LABEL: @src_ins1_v2f64_ext0_v4f64(
155- ; CHECK-NEXT: [[EXT :%.*]] = extractelement <4 x double> [[B:%.*]], i32 0
156- ; CHECK-NEXT: [[INS:%.*]] = insertelement <2 x double> poison, double [[EXT ]], i32 1
155+ ; CHECK-NEXT: [[TMP1 :%.*]] = shufflevector <4 x double> [[B:%.*]], <4 x double> poison, <2 x i32> <i32 0, i32 poison>
156+ ; CHECK-NEXT: [[INS:%.*]] = shufflevector <2 x double> [[TMP1 ]], <2 x double> poison, <2 x i32> <i32 poison, i32 0>
157157; CHECK-NEXT: ret <2 x double> [[INS]]
158158;
159159 %ext = extractelement <4 x double > %b , i32 0
@@ -173,10 +173,15 @@ define <2 x double> @src_ins1_v2f64_ext1_v4f64(<2 x double> %a, <4 x double> %b)
173173}
174174
175175define <2 x double > @src_ins1_v2f64_ext2_v4f64 (<2 x double > %a , <4 x double > %b ) {
176- ; CHECK-LABEL: @src_ins1_v2f64_ext2_v4f64(
177- ; CHECK-NEXT: [[EXT:%.*]] = extractelement <4 x double> [[B:%.*]], i32 2
178- ; CHECK-NEXT: [[INS:%.*]] = insertelement <2 x double> poison, double [[EXT]], i32 1
179- ; CHECK-NEXT: ret <2 x double> [[INS]]
176+ ; SSE-LABEL: @src_ins1_v2f64_ext2_v4f64(
177+ ; SSE-NEXT: [[TMP1:%.*]] = shufflevector <4 x double> [[B:%.*]], <4 x double> poison, <2 x i32> <i32 2, i32 poison>
178+ ; SSE-NEXT: [[INS:%.*]] = shufflevector <2 x double> [[TMP1]], <2 x double> poison, <2 x i32> <i32 poison, i32 0>
179+ ; SSE-NEXT: ret <2 x double> [[INS]]
180+ ;
181+ ; AVX-LABEL: @src_ins1_v2f64_ext2_v4f64(
182+ ; AVX-NEXT: [[EXT:%.*]] = extractelement <4 x double> [[B:%.*]], i32 2
183+ ; AVX-NEXT: [[INS:%.*]] = insertelement <2 x double> poison, double [[EXT]], i32 1
184+ ; AVX-NEXT: ret <2 x double> [[INS]]
180185;
181186 %ext = extractelement <4 x double > %b , i32 2
182187 %ins = insertelement <2 x double > poison, double %ext , i32 1
0 commit comments