llvm-project
f261f140 - [SelectionDAG][RISCV] Teach computeKnownBits to use range metadata for atomic_load. (#137119)

Commit
1 year ago
[SelectionDAG][RISCV] Teach computeKnownBits to use range metadata for atomic_load. (#137119) And teach SelectionDAGBuilder to get the range metadata in visitAtomicLoad. This allows us to recognize that sign extending a byte load of a boolean value from memory will produce zeros for the extended bits. This allow us to remove an AND on RISC-V. Tests copied from #136502 with range metadata added to i1 cases. Some of the test effects overlap with #136502, but that patch can't handle the acquire or seq_cst cases with the Zalasr extension. We only have sign extending versions of those loads.
Author
Parents
Loading