[clang] [llvm] [RISCV] Add a command line option to disable register overlap for vector indexed load. (PR #224739)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 21 12:58:25 PDT 2026


================
@@ -27003,6 +27003,20 @@ RISCVTargetLowering::EmitInstrWithCustomInserter(MachineInstr &MI,
 
 void RISCVTargetLowering::AdjustInstrPostInstrSelection(MachineInstr &MI,
                                                         SDNode *Node) const {
+  if (!Subtarget.allowVectorIndexLoadOverlap()) {
+    const RISCVVPseudosTable::PseudoInfo *RVV =
+        RISCVVPseudosTable::getPseudoInfo(MI.getOpcode());
+    if (RVV && (RVV->BaseInstr == RISCV::VLUXEI8_V ||
----------------
topperc wrote:

The code for that looks a lot less efficient. We end up doing a comparison against 156 different opcodes.

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


More information about the llvm-commits mailing list