[RISCV] Teach RISCVMergeBaseOffset to handle read-modify-write of a global.
The pass was previously limited to LUI+ADDI being used by a single instruction. This patch allows the pass to optimize multiple memory operations that use the same offset. Each of them will receive a separate %lo relocation. My main motivation is to handle a read-modify-write where we have a load and store to the same address, but I didn't restrict it to that case. Reviewed By: asb Differential Revision: https://reviews.llvm.org/D128599
parent
da0f1514
Please register or sign in to comment