[llvm] [RISCV] Split OPERAND_SEW operand type for mask only instructions. (PR #119776)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 13 00:00:15 PST 2024


================
@@ -430,7 +430,9 @@ void RISCVInstrInfo::copyPhysRegVector(
     if (UseVMV) {
       const MCInstrDesc &Desc = DefMBBI->getDesc();
       MIB.add(DefMBBI->getOperand(RISCVII::getVLOpNum(Desc)));  // AVL
-      MIB.add(DefMBBI->getOperand(RISCVII::getSEWOpNum(Desc))); // SEW
+      unsigned Log2SEW =
+          DefMBBI->getOperand(RISCVII::getSEWOpNum(Desc)).getImm();
+      MIB.addImm(Log2SEW ? Log2SEW : 3);                        // SEW
----------------
lukel97 wrote:

Does anything break if we set the AVL + SEW to noreg?

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


More information about the llvm-commits mailing list