forked from OSchip/llvm-project
[RISCV] Fix operand number in debug message in RISCVMergeBaseOffset.
This used to print from the ADDI where the operand number was correct. It recently changed to print from the LUI or AUIPC which needs to use operand 1 instead of 2. This shows up as a crash with -debug.
This commit is contained in:
parent
2b7203a359
commit
a5605f1f68
|
@ -426,7 +426,7 @@ bool RISCVMergeBaseOffsetOpt::runOnMachineFunction(MachineFunction &Fn) {
|
|||
if (!detectFoldable(Hi, Lo))
|
||||
continue;
|
||||
LLVM_DEBUG(dbgs() << " Found lowered global address: "
|
||||
<< *Hi.getOperand(2).getGlobal() << "\n");
|
||||
<< *Hi.getOperand(1).getGlobal() << "\n");
|
||||
MadeChange |= detectAndFoldOffset(Hi, *Lo);
|
||||
MadeChange |= foldIntoMemoryOps(Hi, *Lo);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue