[llvm] [RISCV] Check for null LIS before trying to move AVL in canMutatePriorConfig. (PR #196673)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Fri May 8 20:13:33 PDT 2026


================
@@ -776,6 +776,10 @@ bool RISCVInsertVSETVLI::canMutatePriorConfig(
       VNInfo *VNI = getVNInfoFromReg(AVL.getReg(), MI, LIS);
       VNInfo *PrevVNI = getVNInfoFromReg(AVL.getReg(), PrevMI, LIS);
       if (!VNI || !PrevVNI || VNI != PrevVNI) {
+        // If LIS is null, we were not able to get the VNInfo so we don't know if 
+        // the AVL def needs to be moved.
----------------
topperc wrote:

```suggestion
        // If LIS is null, we were not able to get the VNInfo so we don't know 
        // if the AVL def needs to be moved.
```

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


More information about the llvm-commits mailing list