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

Roger Ferrer Ibáñez via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 12 23:18:50 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
----------------
rofirrim wrote:

Just to confirm I understand: before this we could set accidentally this `vmv.v.v` to `sew=1` (even if it was not used anywhere later) and now it gets normalised to `sew=8` in that case, right?

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


More information about the llvm-commits mailing list