[llvm] [AMDGPU] Support i8/i16 GEP indices when promoting allocas to vectors (PR #175489)
Carl Ritson via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 14 15:20:56 PST 2026
https://github.com/perlfu commented:
In the no_promote tests the alignment of the store is set to 4. So I think as specified the IR actually has undefined results. Should probably drop the alignment to 1.
However this makes me wonder if some of this logic should actually be considering the alignment of the operations on the memory to make the promotion decision instead.
For example if an alignment 4 store is requested to an i8 ptr, then truncating the address is probably legal (can always promote)?
But if there are alignment <= 4 accesses then maybe we never promote.
(Alignment 4 here being a placeholder for natural alignment of the underlying element types.)
https://github.com/llvm/llvm-project/pull/175489
More information about the llvm-commits
mailing list