@@ -46,11 +46,17 @@ define <4 x float> @ext2_v4f32(<4 x float> %x, <4 x float> %y) {
46
46
}
47
47
48
48
define <4 x float > @ext2_v2f32v4f32 (<2 x float > %x , <4 x float > %y ) {
49
- ; CHECK-LABEL: @ext2_v2f32v4f32(
50
- ; CHECK-NEXT: [[E:%.*]] = extractelement <2 x float> [[X:%.*]], i32 2
51
- ; CHECK-NEXT: [[N:%.*]] = fneg float [[E]]
52
- ; CHECK-NEXT: [[R:%.*]] = insertelement <4 x float> [[Y:%.*]], float [[N]], i32 2
53
- ; CHECK-NEXT: ret <4 x float> [[R]]
49
+ ; SSE-LABEL: @ext2_v2f32v4f32(
50
+ ; SSE-NEXT: [[E:%.*]] = extractelement <2 x float> [[X:%.*]], i32 2
51
+ ; SSE-NEXT: [[N:%.*]] = fneg float [[E]]
52
+ ; SSE-NEXT: [[R:%.*]] = insertelement <4 x float> [[Y:%.*]], float [[N]], i32 2
53
+ ; SSE-NEXT: ret <4 x float> [[R]]
54
+ ;
55
+ ; AVX-LABEL: @ext2_v2f32v4f32(
56
+ ; AVX-NEXT: [[TMP1:%.*]] = fneg <2 x float> [[X:%.*]]
57
+ ; AVX-NEXT: [[TMP2:%.*]] = shufflevector <2 x float> [[X]], <2 x float> poison, <4 x i32> <i32 poison, i32 poison, i32 2, i32 poison>
58
+ ; AVX-NEXT: [[R:%.*]] = shufflevector <4 x float> [[Y:%.*]], <4 x float> [[TMP2]], <4 x i32> <i32 0, i32 1, i32 6, i32 3>
59
+ ; AVX-NEXT: ret <4 x float> [[R]]
54
60
;
55
61
%e = extractelement <2 x float > %x , i32 2
56
62
%n = fneg float %e
@@ -73,11 +79,17 @@ define <2 x double> @ext1_v2f64(<2 x double> %x, <2 x double> %y) {
73
79
}
74
80
75
81
define <4 x double > @ext1_v2f64v4f64 (<2 x double > %x , <4 x double > %y ) {
76
- ; CHECK-LABEL: @ext1_v2f64v4f64(
77
- ; CHECK-NEXT: [[E:%.*]] = extractelement <2 x double> [[X:%.*]], i32 1
78
- ; CHECK-NEXT: [[N:%.*]] = fneg nsz double [[E]]
79
- ; CHECK-NEXT: [[R:%.*]] = insertelement <4 x double> [[Y:%.*]], double [[N]], i32 1
80
- ; CHECK-NEXT: ret <4 x double> [[R]]
82
+ ; SSE-LABEL: @ext1_v2f64v4f64(
83
+ ; SSE-NEXT: [[E:%.*]] = extractelement <2 x double> [[X:%.*]], i32 1
84
+ ; SSE-NEXT: [[N:%.*]] = fneg nsz double [[E]]
85
+ ; SSE-NEXT: [[R:%.*]] = insertelement <4 x double> [[Y:%.*]], double [[N]], i32 1
86
+ ; SSE-NEXT: ret <4 x double> [[R]]
87
+ ;
88
+ ; AVX-LABEL: @ext1_v2f64v4f64(
89
+ ; AVX-NEXT: [[TMP1:%.*]] = fneg nsz <2 x double> [[X:%.*]]
90
+ ; AVX-NEXT: [[TMP2:%.*]] = shufflevector <2 x double> [[X]], <2 x double> poison, <4 x i32> <i32 poison, i32 1, i32 poison, i32 poison>
91
+ ; AVX-NEXT: [[R:%.*]] = shufflevector <4 x double> [[Y:%.*]], <4 x double> [[TMP2]], <4 x i32> <i32 0, i32 5, i32 2, i32 3>
92
+ ; AVX-NEXT: ret <4 x double> [[R]]
81
93
;
82
94
%e = extractelement <2 x double > %x , i32 1
83
95
%n = fneg nsz double %e
@@ -304,11 +316,17 @@ define <2 x float> @ext1_v2f32_fsub_fmf(<2 x float> %x, <2 x float> %y) {
304
316
}
305
317
306
318
define <4 x float > @ext1_v2f32v4f32_fsub_fmf (<2 x float > %x , <4 x float > %y ) {
307
- ; CHECK-LABEL: @ext1_v2f32v4f32_fsub_fmf(
308
- ; CHECK-NEXT: [[E:%.*]] = extractelement <2 x float> [[X:%.*]], i32 1
309
- ; CHECK-NEXT: [[S:%.*]] = fsub nnan nsz float 0.000000e+00, [[E]]
310
- ; CHECK-NEXT: [[R:%.*]] = insertelement <4 x float> [[Y:%.*]], float [[S]], i32 1
311
- ; CHECK-NEXT: ret <4 x float> [[R]]
319
+ ; SSE-LABEL: @ext1_v2f32v4f32_fsub_fmf(
320
+ ; SSE-NEXT: [[E:%.*]] = extractelement <2 x float> [[X:%.*]], i32 1
321
+ ; SSE-NEXT: [[S:%.*]] = fsub nnan nsz float 0.000000e+00, [[E]]
322
+ ; SSE-NEXT: [[R:%.*]] = insertelement <4 x float> [[Y:%.*]], float [[S]], i32 1
323
+ ; SSE-NEXT: ret <4 x float> [[R]]
324
+ ;
325
+ ; AVX-LABEL: @ext1_v2f32v4f32_fsub_fmf(
326
+ ; AVX-NEXT: [[TMP1:%.*]] = fneg nnan nsz <2 x float> [[X:%.*]]
327
+ ; AVX-NEXT: [[TMP2:%.*]] = shufflevector <2 x float> [[X]], <2 x float> poison, <4 x i32> <i32 poison, i32 1, i32 poison, i32 poison>
328
+ ; AVX-NEXT: [[R:%.*]] = shufflevector <4 x float> [[Y:%.*]], <4 x float> [[TMP2]], <4 x i32> <i32 0, i32 5, i32 2, i32 3>
329
+ ; AVX-NEXT: ret <4 x float> [[R]]
312
330
;
313
331
%e = extractelement <2 x float > %x , i32 1
314
332
%s = fsub nsz nnan float 0 .0 , %e
0 commit comments