Skip to content

Commit fcce308

Browse files
authored
[X86][AVX10.2] Fix unexpected larger scope (#130767)
https://godbolt.org/z/oM6bcqEnr
1 parent 913d077 commit fcce308

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

llvm/lib/Target/X86/X86InstrSSE.td

+2-2
Original file line numberDiff line numberDiff line change
@@ -6121,8 +6121,9 @@ let Predicates = [HasAVX, NoAVX10_2] in {
61216121
v8i16, VR128, load, i128mem, 0,
61226122
SchedWriteMPSAD.XMM>, VEX, VVVV, WIG;
61236123
}
6124+
}
61246125

6125-
let Uses = [MXCSR], mayRaiseFPException = 1 in {
6126+
let Predicates = [HasAVX], Uses = [MXCSR], mayRaiseFPException = 1 in {
61266127
let ExeDomain = SSEPackedSingle in
61276128
defm VDPPS : SS41I_binop_rmi_int<0x40, "vdpps", int_x86_sse41_dpps,
61286129
VR128, load, f128mem, 0,
@@ -6136,7 +6137,6 @@ let Uses = [MXCSR], mayRaiseFPException = 1 in {
61366137
VR256, load, i256mem, 0,
61376138
SchedWriteDPPS.YMM>, VEX, VVVV, VEX_L, WIG;
61386139
}
6139-
}
61406140

61416141
let Predicates = [HasAVX2, NoAVX10_2] in {
61426142
let isCommutable = 0 in {

llvm/test/CodeGen/X86/avx10_2_512ni-intrinsics.ll

+11
Original file line numberDiff line numberDiff line change
@@ -422,3 +422,14 @@ define { <32 x i16>, <32 x i16>, <32 x i16> } @test_mm512_mask_mpsadbw(<64 x i8>
422422
}
423423

424424
declare <32 x i16> @llvm.x86.avx10.vmpsadbw.512(<64 x i8>, <64 x i8>, i8)
425+
426+
; Regression test
427+
428+
define <8 x float> @avx_dp_ps(<8 x float> %a, <8 x float> %b) {
429+
; CHECK-LABEL: avx_dp_ps:
430+
; CHECK: # %bb.0:
431+
; CHECK-NEXT: vdpps $255, %ymm1, %ymm0, %ymm0 # encoding: [0xc4,0xe3,0x7d,0x40,0xc1,0xff]
432+
; CHECK-NEXT: ret{{[l|q]}} # encoding: [0xc3]
433+
%r = tail call <8 x float> @llvm.x86.avx.dp.ps.256(<8 x float> %a, <8 x float> %b, i8 -1)
434+
ret <8 x float> %r
435+
}

0 commit comments

Comments
 (0)