[clang] [Clang] Assume unaligned in maksed load / store builtins (PR #156063)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 10 14:50:01 PDT 2025
efriedma-quic wrote:
Deferencing a pointer, __builtin_memcpy, and most other operations that involve accessing pointers, currently assume pointers are naturally aligned. The exact representation of this in LLVM IR varies, but the fundamental assumption is that you're following normal C/C++ standard rules for pointer alignment.
My concern here is mostly consistency: I don't want to have this small cluster of vector intrinsics to have different rules from everything else.
The reason I mentioned changing the interface before is related to this: if the masked load/store intrinsics take a pointer to the element type, instead of the vector type, that naturally reduces the required alignment. The element pointer will have smaller alignment.
https://github.com/llvm/llvm-project/pull/156063
More information about the cfe-commits
mailing list