@@ -26,21 +26,31 @@ define <4 x double> @src_ins1_v4f64_ext0_v2f64(<4 x double> %a, <2 x double> %b)
26
26
}
27
27
28
28
define <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]]
33
38
;
34
39
%ext = extractelement <2 x double > %b , i32 0
35
40
%ins = insertelement <4 x double > poison, double %ext , i32 2
36
41
ret <4 x double > %ins
37
42
}
38
43
39
44
define <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]]
44
54
;
45
55
%ext = extractelement <2 x double > %b , i32 0
46
56
%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)
60
70
61
71
define <4 x double > @src_ins1_v4f64_ext1_v2f64 (<4 x double > %a , <2 x double > %b ) #0 {
62
72
; 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>
65
75
; CHECK-NEXT: ret <4 x double> [[INS]]
66
76
;
67
77
%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)
70
80
}
71
81
72
82
define <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]]
77
92
;
78
93
%ext = extractelement <2 x double > %b , i32 1
79
94
%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)
82
97
83
98
define <4 x double > @src_ins3_v4f64_ext1_v2f64 (<4 x double > %a , <2 x double > %b ) #0 {
84
99
; 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>
87
102
; CHECK-NEXT: ret <4 x double> [[INS]]
88
103
;
89
104
%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)
148
163
149
164
define <2 x double > @src_ins1_v2f64_ext1_v4f64 (<2 x double > %a , <4 x double > %b ) {
150
165
; 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>
153
168
; CHECK-NEXT: ret <2 x double> [[INS]]
154
169
;
155
170
%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)
170
185
171
186
define <2 x double > @src_ins1_v2f64_ext3_v4f64 (<2 x double > %a , <4 x double > %b ) {
172
187
; 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>
175
190
; CHECK-NEXT: ret <2 x double> [[INS]]
176
191
;
177
192
%ext = extractelement <4 x double > %b , i32 3
178
193
%ins = insertelement <2 x double > poison, double %ext , i32 1
179
194
ret <2 x double > %ins
180
195
}
181
196
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