[llvm] [RISCV] Support postRA vsetvl insertion pass (PR #70549)

Piyou Chen via llvm-commits llvm-commits at lists.llvm.org
Thu May 2 00:23:59 PDT 2024


================
@@ -198,13 +231,15 @@ static bool hasUndefinedMergeOp(const MachineInstr &MI,
   if (UseMO.getReg().isPhysical())
     return false;
 
-  if (MachineInstr *UseMI = MRI.getVRegDef(UseMO.getReg())) {
+  if (const MachineInstr *UseMI =
----------------
BeMg wrote:

I don't think it's safe to use getVRegDef to find the register definition here. Even though it's always a virtual register, it's still possible for it to be defined multiple times in non-SSA environment.



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


More information about the llvm-commits mailing list