@@ -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,21 +80,31 @@ 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
8095 ret <4 x double > %ins
8196}
8297
8398define <4 x double > @src_ins3_v4f64_ext1_v2f64 (<4 x double > %a , <2 x double > %b ) #0 {
84- ; 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
87- ; CHECK-NEXT: ret <4 x double> [[INS]]
99+ ; SSE-LABEL: @src_ins3_v4f64_ext1_v2f64(
100+ ; SSE-NEXT: [[EXT:%.*]] = extractelement <2 x double> [[B:%.*]], i32 1
101+ ; SSE-NEXT: [[INS:%.*]] = insertelement <4 x double> poison, double [[EXT]], i32 3
102+ ; SSE-NEXT: ret <4 x double> [[INS]]
103+ ;
104+ ; AVX-LABEL: @src_ins3_v4f64_ext1_v2f64(
105+ ; AVX-NEXT: [[TMP1:%.*]] = shufflevector <2 x double> [[B:%.*]], <2 x double> poison, <4 x i32> <i32 1, i32 poison, i32 poison, i32 poison>
106+ ; AVX-NEXT: [[INS:%.*]] = shufflevector <4 x double> [[TMP1]], <4 x double> poison, <4 x i32> <i32 poison, i32 poison, i32 poison, i32 0>
107+ ; AVX-NEXT: ret <4 x double> [[INS]]
88108;
89109 %ext = extractelement <2 x double > %b , i32 1
90110 %ins = insertelement <4 x double > poison, double %ext , i32 3
@@ -148,8 +168,8 @@ define <2 x double> @src_ins1_v2f64_ext0_v4f64(<2 x double> %a, <4 x double> %b)
148168
149169define <2 x double > @src_ins1_v2f64_ext1_v4f64 (<2 x double > %a , <4 x double > %b ) {
150170; 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
171+ ; CHECK-NEXT: [[TMP1 :%.*]] = shufflevector <4 x double> [[B:%.*]], <4 x double> poison, <2 x i32> <i32 1, i32 poison>
172+ ; CHECK-NEXT: [[INS:%.*]] = shufflevector <2 x double> [[TMP1 ]], <2 x double> poison, <2 x i32> <i32 poison, i32 0>
153173; CHECK-NEXT: ret <2 x double> [[INS]]
154174;
155175 %ext = extractelement <4 x double > %b , i32 1
@@ -170,15 +190,12 @@ define <2 x double> @src_ins1_v2f64_ext2_v4f64(<2 x double> %a, <4 x double> %b)
170190
171191define <2 x double > @src_ins1_v2f64_ext3_v4f64 (<2 x double > %a , <4 x double > %b ) {
172192; 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
193+ ; CHECK-NEXT: [[TMP1 :%.*]] = shufflevector <4 x double> [[B:%.*]], <4 x double> poison, <2 x i32> <i32 3, i32 poison>
194+ ; CHECK-NEXT: [[INS:%.*]] = shufflevector <2 x double> [[TMP1 ]], <2 x double> poison, <2 x i32> <i32 poison, i32 0>
175195; CHECK-NEXT: ret <2 x double> [[INS]]
176196;
177197 %ext = extractelement <4 x double > %b , i32 3
178198 %ins = insertelement <2 x double > poison, double %ext , i32 1
179199 ret <2 x double > %ins
180200}
181201
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