[llvm] [RISCV] Merge Base Offset for SFB Pseudos (PR #187620)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 19 20:15:51 PDT 2026


================
@@ -451,6 +451,34 @@ bool RISCVMergeBaseOffsetOpt::foldIntoMemoryOps(MachineInstr &Hi,
       CommonOffset = Offset;
       break;
     }
+    case RISCV::PseudoCCLD:
+    case RISCV::PseudoCCLW:
+    case RISCV::PseudoCCLWU:
+    case RISCV::PseudoCCLH:
+    case RISCV::PseudoCCLHU:
+    case RISCV::PseudoCCLB:
+    case RISCV::PseudoCCLBU: {
+      // The SFB Pseudos are like their non-SFB counterparts but have more
+      // operands.
+      if (UseMI.getOperand(2).isFI())
+        return false;
+      // Register defined by Lo should not be the value register.
----------------
topperc wrote:

This comment could be improved. Looks like it was copied from stores?

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


More information about the llvm-commits mailing list