[PATCH] D101850: [WebAssembly] Set alignment to 1 for SIMD memory intrinsics
Thomas Lively via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 4 16:46:02 PDT 2021
tlively added a comment.
In D101850#2737379 <https://reviews.llvm.org/D101850#2737379>, @aheejin wrote:
> Sorry I'm not sure if I understand. The "expected alignment" for all those memory instructions is 1, regardless of the size of the element of the vectors? Can you elaborate on why the previous code is incorrect?
Users of the SIMD intrinsic header functions (and therefore the clang builtins (and therefore the LLVM intrinsics)) for these instructions should be able to pass pointers to arbitrary unaligned data. In the backend, we won't know what the alignment of the data is, so we need to conservatively say that it is 1. Previously, if users used those intrinsics with unaligned data, the alignment hint emitted into the binary would be wrong because it would be too big.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101850/new/
https://reviews.llvm.org/D101850
More information about the llvm-commits
mailing list