[PATCH] D80364: [amdgpu] Teach load widening to handle non-DWORD aligned loads.

Michael Liao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 21 12:03:36 PDT 2020


hliao marked an inline comment as done.
hliao added a comment.

This patch is still required as MMO's alignment is calculated based on the offset from the base alignment. As the base alignment is the alignment from the pointer in the IR, it cannot be modified. We need extra logic to re-align MMO operand if we widen the original one. For instance of a 16-bit load from `ptr` has an alignment of 2, if `ptr` is equivalent to `base - 2` and `base`'s alignment is 4, we could widen that 16-bit load to 32-bit load from `ptr - 2`with an alignment 4. But, as we cannot change IR in MMO, we need extra stuff to in the new MMO could assume that new alignment.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80364/new/

https://reviews.llvm.org/D80364



More information about the llvm-commits mailing list