[llvm] [RISCV] Add XSfmm pseudo instruction and vset* insertion support (PR #143068)

Brandon Wu via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 6 21:05:32 PDT 2025


================
@@ -1784,6 +1899,83 @@ void RISCVInsertVSETVLI::insertReadVL(MachineBasicBlock &MBB) {
   }
 }
 
+static void shrinkIntervalAndRemoveDeadMI(MachineOperand &MO,
+                                          LiveIntervals *LIS,
+                                          const TargetInstrInfo *TII) {
+  Register Reg = MO.getReg();
+  MO.setReg(RISCV::NoRegister);
+  MO.setIsKill(false);
+
+  if (!LIS)
+    return;
+
+  LiveInterval &LI = LIS->getInterval(Reg);
+
+  // Erase the AVL operand from the instruction.
----------------
4vtomat wrote:

got it! thanks!

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


More information about the llvm-commits mailing list