Skip to content

[X86][NFC] Add missing immediate qualifier to VSM3RNDS2 instruction #131576

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 17, 2025

Conversation

phoebewang
Copy link
Contributor

No description provided.

@llvmbot
Copy link
Member

llvmbot commented Mar 17, 2025

@llvm/pr-subscribers-backend-x86

Author: Phoebe Wang (phoebewang)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/131576.diff

2 Files Affected:

  • (modified) llvm/lib/Target/X86/X86InstrSSE.td (+2-2)
  • (modified) llvm/test/TableGen/x86-fold-tables.inc (+1-1)
diff --git a/llvm/lib/Target/X86/X86InstrSSE.td b/llvm/lib/Target/X86/X86InstrSSE.td
index 2a7ab1e310618..49a62fd3422d0 100644
--- a/llvm/lib/Target/X86/X86InstrSSE.td
+++ b/llvm/lib/Target/X86/X86InstrSSE.td
@@ -8384,14 +8384,14 @@ let Predicates = [HasSM3], Constraints = "$src1 = $dst" in {
   }
 
   multiclass VSM3RNDS2_Base {
-    def rr : Ii8<0xde, MRMSrcReg, (outs VR128:$dst),
+    def rri : Ii8<0xde, MRMSrcReg, (outs VR128:$dst),
               (ins VR128:$src1, VR128:$src2, VR128:$src3, i32u8imm:$src4),
               "vsm3rnds2\t{$src4, $src3, $src2, $dst|$dst, $src2, $src3, $src4}",
               [(set VR128:$dst,
                (int_x86_vsm3rnds2 VR128:$src1,
                 VR128:$src2, VR128:$src3, timm:$src4))]>,
               Sched<[WriteVecIMul]>;
-    def rm : Ii8<0xde, MRMSrcMem, (outs VR128:$dst),
+    def rmi : Ii8<0xde, MRMSrcMem, (outs VR128:$dst),
               (ins VR128:$src1, VR128:$src2, i128mem:$src3, i32u8imm:$src4),
               "vsm3rnds2\t{$src4, $src3, $src2, $dst|$dst, $src2, $src3, $src4}",
               [(set VR128:$dst,
diff --git a/llvm/test/TableGen/x86-fold-tables.inc b/llvm/test/TableGen/x86-fold-tables.inc
index 18b138f86f778..9a5ed0452d08a 100644
--- a/llvm/test/TableGen/x86-fold-tables.inc
+++ b/llvm/test/TableGen/x86-fold-tables.inc
@@ -6025,7 +6025,7 @@ static const X86FoldTableEntry Table3[] = {
   {X86::VSHUFPSZrrikz, X86::VSHUFPSZrmikz, 0},
   {X86::VSM3MSG1rr, X86::VSM3MSG1rm, 0},
   {X86::VSM3MSG2rr, X86::VSM3MSG2rm, 0},
-  {X86::VSM3RNDS2rr, X86::VSM3RNDS2rm, 0},
+  {X86::VSM3RNDS2rri, X86::VSM3RNDS2rmi, 0},
   {X86::VSQRTBF16Z128rk, X86::VSQRTBF16Z128mk, 0},
   {X86::VSQRTBF16Z256rk, X86::VSQRTBF16Z256mk, 0},
   {X86::VSQRTBF16Zrk, X86::VSQRTBF16Zmk, 0},

Copy link
Collaborator

@RKSimon RKSimon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - cheers

@phoebewang phoebewang merged commit 5c73c5c into llvm:main Mar 17, 2025
13 checks passed
@phoebewang phoebewang deleted the SM3 branch March 17, 2025 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants