You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[CostModel][X86] Attempt to match cheap v4f32 shuffles that map to SHUFPS instruction (llvm#121778)
Avoid always assuming the worst for v4f32 2 input shuffles, and match the SHUFPS pattern where possible - each pair of output elements must come from the same source register.
Copy file name to clipboardExpand all lines: llvm/test/Analysis/CostModel/X86/alternate-shuffle-cost.ll
+3-15Lines changed: 3 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -247,21 +247,9 @@ define <4 x float> @test_v4f32_2(<4 x float> %a, <4 x float> %b) {
247
247
}
248
248
249
249
define <4 x float> @test_v4f32_3(<4 x float> %a, <4 x float> %b) {
250
-
; SSE2-LABEL: 'test_v4f32_3'
251
-
; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 4, i32 5, i32 2, i32 3>
252
-
; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x float> %1
253
-
;
254
-
; SSSE3-LABEL: 'test_v4f32_3'
255
-
; SSSE3-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 4, i32 5, i32 2, i32 3>
256
-
; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x float> %1
257
-
;
258
-
; SSE42-LABEL: 'test_v4f32_3'
259
-
; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 4, i32 5, i32 2, i32 3>
260
-
; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x float> %1
261
-
;
262
-
; AVX-LABEL: 'test_v4f32_3'
263
-
; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 4, i32 5, i32 2, i32 3>
264
-
; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x float> %1
250
+
; CHECK-LABEL: 'test_v4f32_3'
251
+
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 4, i32 5, i32 2, i32 3>
252
+
; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x float> %1
265
253
;
266
254
%1 = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i324, i325, i322, i323>
0 commit comments