Skip to content

Commit f490844

Browse files
committed
updated testcase
1 parent 78fd2c4 commit f490844

File tree

1 file changed

+10
-22
lines changed

1 file changed

+10
-22
lines changed

llvm/test/Transforms/VectorCombine/X86/extract-fneg-insert.ll

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,11 @@ define <4 x float> @ext2_v4f32(<4 x float> %x, <4 x float> %y) {
4646
}
4747

4848
define <4 x float> @ext2_v2f32v4f32(<2 x float> %x, <4 x float> %y) {
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]]
49+
; CHECK-LABEL: @ext2_v2f32v4f32(
50+
; CHECK-NEXT: [[TMP1:%.*]] = fneg <2 x float> [[X:%.*]]
51+
; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <2 x float> [[X]], <2 x float> poison, <4 x i32> <i32 poison, i32 poison, i32 2, i32 poison>
52+
; CHECK-NEXT: [[R:%.*]] = shufflevector <4 x float> [[Y:%.*]], <4 x float> [[TMP2]], <4 x i32> <i32 0, i32 1, i32 6, i32 3>
53+
; CHECK-NEXT: ret <4 x float> [[R]]
6054
;
6155
%e = extractelement <2 x float> %x, i32 2
6256
%n = fneg float %e
@@ -316,17 +310,11 @@ define <2 x float> @ext1_v2f32_fsub_fmf(<2 x float> %x, <2 x float> %y) {
316310
}
317311

318312
define <4 x float> @ext1_v2f32v4f32_fsub_fmf(<2 x float> %x, <4 x float> %y) {
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]]
313+
; CHECK-LABEL: @ext1_v2f32v4f32_fsub_fmf(
314+
; CHECK-NEXT: [[TMP1:%.*]] = fneg nnan nsz <2 x float> [[X:%.*]]
315+
; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <2 x float> [[X]], <2 x float> poison, <4 x i32> <i32 poison, i32 1, i32 poison, i32 poison>
316+
; CHECK-NEXT: [[R:%.*]] = shufflevector <4 x float> [[Y:%.*]], <4 x float> [[TMP2]], <4 x i32> <i32 0, i32 5, i32 2, i32 3>
317+
; CHECK-NEXT: ret <4 x float> [[R]]
330318
;
331319
%e = extractelement <2 x float> %x, i32 1
332320
%s = fsub nsz nnan float 0.0, %e

0 commit comments

Comments
 (0)