llvm-project
5b41eb3a - [RISCV] Fix more boundary cases in immediate selection for Zdinx load/store on RV32. (#105874)

Commit
1 year ago
[RISCV] Fix more boundary cases in immediate selection for Zdinx load/store on RV32. (#105874) In order to support -unaligned-scalar-mem properly, we need to be more careful with immediates of global variables. We need to guarantee that adding 4 in RISCVExpandingPseudos won't overflow simm12. Since we don't know what the simm12 is until link time, the only way to guarantee this is to make sure the base address is at least 8 byte aligned. There were also several corner cases bugs in immediate folding where we would fold an immediate in the range [2044,2047] where adding 4 would overflow. These are not related to unaligned-scalar-mem.
Author
Parents
Loading