@@ -26,21 +26,31 @@ define <4 x double> @src_ins1_v4f64_ext0_v2f64(<4 x double> %a, <2 x double> %b)
2626}
2727
2828define <4 x double > @src_ins2_v4f64_ext0_v2f64 (<4 x double > %a , <2 x double > %b ) #0 {
29- ; CHECK-LABEL: @src_ins2_v4f64_ext0_v2f64(
30- ; CHECK-NEXT: [[EXT:%.*]] = extractelement <2 x double> [[B:%.*]], i32 0
31- ; CHECK-NEXT: [[INS:%.*]] = insertelement <4 x double> poison, double [[EXT]], i32 2
32- ; CHECK-NEXT: ret <4 x double> [[INS]]
29+ ; SSE-LABEL: @src_ins2_v4f64_ext0_v2f64(
30+ ; SSE-NEXT: [[EXT:%.*]] = extractelement <2 x double> [[B:%.*]], i32 0
31+ ; SSE-NEXT: [[INS:%.*]] = insertelement <4 x double> poison, double [[EXT]], i32 2
32+ ; SSE-NEXT: ret <4 x double> [[INS]]
33+ ;
34+ ; AVX-LABEL: @src_ins2_v4f64_ext0_v2f64(
35+ ; AVX-NEXT: [[TMP1:%.*]] = shufflevector <2 x double> [[B:%.*]], <2 x double> poison, <4 x i32> <i32 0, i32 poison, i32 poison, i32 poison>
36+ ; AVX-NEXT: [[INS:%.*]] = shufflevector <4 x double> [[TMP1]], <4 x double> poison, <4 x i32> <i32 poison, i32 poison, i32 0, i32 poison>
37+ ; AVX-NEXT: ret <4 x double> [[INS]]
3338;
3439 %ext = extractelement <2 x double > %b , i32 0
3540 %ins = insertelement <4 x double > poison, double %ext , i32 2
3641 ret <4 x double > %ins
3742}
3843
3944define <4 x double > @src_ins3_v4f64_ext0_v2f64 (<4 x double > %a , <2 x double > %b ) #0 {
40- ; CHECK-LABEL: @src_ins3_v4f64_ext0_v2f64(
41- ; CHECK-NEXT: [[EXT:%.*]] = extractelement <2 x double> [[B:%.*]], i32 0
42- ; CHECK-NEXT: [[INS:%.*]] = insertelement <4 x double> poison, double [[EXT]], i32 3
43- ; CHECK-NEXT: ret <4 x double> [[INS]]
45+ ; SSE-LABEL: @src_ins3_v4f64_ext0_v2f64(
46+ ; SSE-NEXT: [[EXT:%.*]] = extractelement <2 x double> [[B:%.*]], i32 0
47+ ; SSE-NEXT: [[INS:%.*]] = insertelement <4 x double> poison, double [[EXT]], i32 3
48+ ; SSE-NEXT: ret <4 x double> [[INS]]
49+ ;
50+ ; AVX-LABEL: @src_ins3_v4f64_ext0_v2f64(
51+ ; AVX-NEXT: [[TMP1:%.*]] = shufflevector <2 x double> [[B:%.*]], <2 x double> poison, <4 x i32> <i32 0, i32 poison, i32 poison, i32 poison>
52+ ; AVX-NEXT: [[INS:%.*]] = shufflevector <4 x double> [[TMP1]], <4 x double> poison, <4 x i32> <i32 poison, i32 poison, i32 poison, i32 0>
53+ ; AVX-NEXT: ret <4 x double> [[INS]]
4454;
4555 %ext = extractelement <2 x double > %b , i32 0
4656 %ins = insertelement <4 x double > poison, double %ext , i32 3
@@ -60,8 +70,8 @@ define <4 x double> @src_ins0_v4f64_ext1_v2f64(<4 x double> %a, <2 x double> %b)
6070
6171define <4 x double > @src_ins1_v4f64_ext1_v2f64 (<4 x double > %a , <2 x double > %b ) #0 {
6272; CHECK-LABEL: @src_ins1_v4f64_ext1_v2f64(
63- ; CHECK-NEXT: [[EXT :%.*]] = extractelement <2 x double> [[B:%.*]], i32 1
64- ; CHECK-NEXT: [[INS:%.*]] = insertelement <4 x double> poison, double [[EXT ]], i32 1
73+ ; CHECK-NEXT: [[TMP1 :%.*]] = shufflevector <2 x double> [[B:%.*]], <2 x double> poison, <4 x i32> <i32 1, i32 poison, i32 poison, i32 poison>
74+ ; CHECK-NEXT: [[INS:%.*]] = shufflevector <4 x double> [[TMP1 ]], <4 x double> poison, <4 x i32> <i32 poison, i32 0, i32 poison, i32 poison>
6575; CHECK-NEXT: ret <4 x double> [[INS]]
6676;
6777 %ext = extractelement <2 x double > %b , i32 1
@@ -70,10 +80,15 @@ define <4 x double> @src_ins1_v4f64_ext1_v2f64(<4 x double> %a, <2 x double> %b)
7080}
7181
7282define <4 x double > @src_ins2_v4f64_ext1_v2f64 (<4 x double > %a , <2 x double > %b ) #0 {
73- ; CHECK-LABEL: @src_ins2_v4f64_ext1_v2f64(
74- ; CHECK-NEXT: [[EXT:%.*]] = extractelement <2 x double> [[B:%.*]], i32 1
75- ; CHECK-NEXT: [[INS:%.*]] = insertelement <4 x double> poison, double [[EXT]], i32 2
76- ; 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 1, i32 poison, 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 0, i32 poison>
91+ ; AVX-NEXT: ret <4 x double> [[INS]]
7792;
7893 %ext = extractelement <2 x double > %b , i32 1
7994 %ins = insertelement <4 x double > poison, double %ext , i32 2
@@ -82,8 +97,8 @@ define <4 x double> @src_ins2_v4f64_ext1_v2f64(<4 x double> %a, <2 x double> %b)
8297
8398define <4 x double > @src_ins3_v4f64_ext1_v2f64 (<4 x double > %a , <2 x double > %b ) #0 {
8499; CHECK-LABEL: @src_ins3_v4f64_ext1_v2f64(
85- ; CHECK-NEXT: [[EXT :%.*]] = extractelement <2 x double> [[B:%.*]], i32 1
86- ; CHECK-NEXT: [[INS:%.*]] = insertelement <4 x double> poison, double [[EXT ]], i32 3
100+ ; CHECK-NEXT: [[TMP1 :%.*]] = shufflevector <2 x double> [[B:%.*]], <2 x double> poison, <4 x i32> <i32 1, i32 poison, i32 poison, i32 poison>
101+ ; CHECK-NEXT: [[INS:%.*]] = shufflevector <4 x double> [[TMP1 ]], <4 x double> poison, <4 x i32> <i32 poison, i32 poison, i32 poison, i32 0>
87102; CHECK-NEXT: ret <4 x double> [[INS]]
88103;
89104 %ext = extractelement <2 x double > %b , i32 1
@@ -148,8 +163,8 @@ define <2 x double> @src_ins1_v2f64_ext0_v4f64(<2 x double> %a, <4 x double> %b)
148163
149164define <2 x double > @src_ins1_v2f64_ext1_v4f64 (<2 x double > %a , <4 x double > %b ) {
150165; CHECK-LABEL: @src_ins1_v2f64_ext1_v4f64(
151- ; CHECK-NEXT: [[EXT :%.*]] = extractelement <4 x double> [[B:%.*]], i32 1
152- ; CHECK-NEXT: [[INS:%.*]] = insertelement <2 x double> poison, double [[EXT ]], i32 1
166+ ; CHECK-NEXT: [[TMP1 :%.*]] = shufflevector <4 x double> [[B:%.*]], <4 x double> poison, <2 x i32> <i32 1, i32 poison>
167+ ; CHECK-NEXT: [[INS:%.*]] = shufflevector <2 x double> [[TMP1 ]], <2 x double> poison, <2 x i32> <i32 poison, i32 0>
153168; CHECK-NEXT: ret <2 x double> [[INS]]
154169;
155170 %ext = extractelement <4 x double > %b , i32 1
@@ -170,15 +185,12 @@ define <2 x double> @src_ins1_v2f64_ext2_v4f64(<2 x double> %a, <4 x double> %b)
170185
171186define <2 x double > @src_ins1_v2f64_ext3_v4f64 (<2 x double > %a , <4 x double > %b ) {
172187; CHECK-LABEL: @src_ins1_v2f64_ext3_v4f64(
173- ; CHECK-NEXT: [[EXT :%.*]] = extractelement <4 x double> [[B:%.*]], i32 3
174- ; CHECK-NEXT: [[INS:%.*]] = insertelement <2 x double> poison, double [[EXT ]], i32 1
188+ ; CHECK-NEXT: [[TMP1 :%.*]] = shufflevector <4 x double> [[B:%.*]], <4 x double> poison, <2 x i32> <i32 3, i32 poison>
189+ ; CHECK-NEXT: [[INS:%.*]] = shufflevector <2 x double> [[TMP1 ]], <2 x double> poison, <2 x i32> <i32 poison, i32 0>
175190; CHECK-NEXT: ret <2 x double> [[INS]]
176191;
177192 %ext = extractelement <4 x double > %b , i32 3
178193 %ins = insertelement <2 x double > poison, double %ext , i32 1
179194 ret <2 x double > %ins
180195}
181196
182- ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
183- ; AVX: {{.*}}
184- ; SSE: {{.*}}
0 commit comments