[llvm] [X86][NFC] Add missing immediate qualifier to VSM3RNDS2 instruction (PR #131576)

via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 17 00:45:26 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-x86

Author: Phoebe Wang (phoebewang)

<details>
<summary>Changes</summary>



---
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
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},

``````````

</details>


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


More information about the llvm-commits mailing list