Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RISCV] Considering existing offset in the alignment when folding ADD…
…Is into load/store. getPointerAlignment and ConstantPoolSDNode::getAlign only consider the alignment of the object. If we already have a non-zero offset into the offset that may have reduced the alignment. Since the base pointer will become an LUI with the old offset, we need to be sure the new offset fits in the alignment of the address that will be used to create the LUI immediate. I'm not sure it is possible to have a non-zero offset in the GlobalAddressSDNode or ConstantPoolSDNode at this point today so this may only be a theoretical bug. Differential Revision: https://reviews.llvm.org/D129006
- Loading branch information