[llvm] [RISCV] Adjust LMUL if not used to avoid VL toggle (PR #69259)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 20 11:27:11 PDT 2023


================
@@ -1484,6 +1535,15 @@ void RISCVInsertVSETVLI::doLocalPostpass(MachineBasicBlock &MBB) {
       Used.demandVL();
 
     if (NextMI) {
+      if (auto NewVType = canAdjustSEWLMULRatio(MI, *NextMI, Used)) {
+        MI.getOperand(2).setImm(*NewVType);
----------------
preames wrote:

Have we properly guarded for the save/restore form which has a vreg as operand 2?

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


More information about the llvm-commits mailing list