Affected instructions:
PseudoLI simplest form (ADDI with X0)
ALU operations with immediate (they do not set status flag - ADDI, ORI, XORI)
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
I think it would be best to have a separate patch to fix isReMaterializable for LUI affecting the neighbouring instructions, and leave this patch for the isAsCheapAsAMove changes.
I'd be very happy for you to directly commit the change to isReMaterializable for LUI, and we can focus on discussing isAsCheapAsAMove here.
lib/Target/RISCV/RISCVInstrInfo.td | ||
---|---|---|
311 ↗ | (On Diff #181360) | Should LUI have isAsCheapAsAMove = 1? |
Sure, will update this patch and I have pushed the other changes to separate patches:
R351895 - Fixed isReMaterializable setting for LUI instruction.
https://reviews.llvm.org/D57069 [RISCV] Fixed isReMaterializable setting for ORI, XORI
LGTM, thanks. Might be best titled as something like "[RISCV] Set isAsCheapAsAMove for ADDI, ORI, XORI, LUI"
Hi Ana. I reviewed the test changes caused by this commit, and they all seem fine to me.