[llvm] [X86][AVX10.2] Fix unexpected larger scope (PR #130767)
Phoebe Wang via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 11 05:55:05 PDT 2025
https://github.com/phoebewang created https://github.com/llvm/llvm-project/pull/130767
https://godbolt.org/z/oM6bcqEnr
>From 3f32540fdb1a3daab25bbc855d7dc165b1b3cbbb Mon Sep 17 00:00:00 2001
From: "Wang, Phoebe" <phoebe.wang at intel.com>
Date: Tue, 11 Mar 2025 20:49:25 +0800
Subject: [PATCH] [X86][AVX10.2] Fix unexpected larger scope
---
llvm/lib/Target/X86/X86InstrSSE.td | 4 ++--
llvm/test/CodeGen/X86/avx10_2_512ni-intrinsics.ll | 11 +++++++++++
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/llvm/lib/Target/X86/X86InstrSSE.td b/llvm/lib/Target/X86/X86InstrSSE.td
index 6aadb788c851e..2a7ab1e310618 100644
--- a/llvm/lib/Target/X86/X86InstrSSE.td
+++ b/llvm/lib/Target/X86/X86InstrSSE.td
@@ -6121,8 +6121,9 @@ let Predicates = [HasAVX, NoAVX10_2] in {
v8i16, VR128, load, i128mem, 0,
SchedWriteMPSAD.XMM>, VEX, VVVV, WIG;
}
+}
-let Uses = [MXCSR], mayRaiseFPException = 1 in {
+let Predicates = [HasAVX], Uses = [MXCSR], mayRaiseFPException = 1 in {
let ExeDomain = SSEPackedSingle in
defm VDPPS : SS41I_binop_rmi_int<0x40, "vdpps", int_x86_sse41_dpps,
VR128, load, f128mem, 0,
@@ -6136,7 +6137,6 @@ let Uses = [MXCSR], mayRaiseFPException = 1 in {
VR256, load, i256mem, 0,
SchedWriteDPPS.YMM>, VEX, VVVV, VEX_L, WIG;
}
-}
let Predicates = [HasAVX2, NoAVX10_2] in {
let isCommutable = 0 in {
diff --git a/llvm/test/CodeGen/X86/avx10_2_512ni-intrinsics.ll b/llvm/test/CodeGen/X86/avx10_2_512ni-intrinsics.ll
index 07e86cb01e133..b2e7caa15944c 100644
--- a/llvm/test/CodeGen/X86/avx10_2_512ni-intrinsics.ll
+++ b/llvm/test/CodeGen/X86/avx10_2_512ni-intrinsics.ll
@@ -422,3 +422,14 @@ define { <32 x i16>, <32 x i16>, <32 x i16> } @test_mm512_mask_mpsadbw(<64 x i8>
}
declare <32 x i16> @llvm.x86.avx10.vmpsadbw.512(<64 x i8>, <64 x i8>, i8)
+
+; Regression test
+
+define <8 x float> @avx_dp_ps(<8 x float> %a, <8 x float> %b) {
+; CHECK-LABEL: avx_dp_ps:
+; CHECK: # %bb.0:
+; CHECK-NEXT: vdpps $255, %ymm1, %ymm0, %ymm0 # encoding: [0xc4,0xe3,0x7d,0x40,0xc1,0xff]
+; CHECK-NEXT: ret{{[l|q]}} # encoding: [0xc3]
+ %r = tail call <8 x float> @llvm.x86.avx.dp.ps.256(<8 x float> %a, <8 x float> %b, i8 -1)
+ ret <8 x float> %r
+}
More information about the llvm-commits
mailing list