[PATCH] D123642: [clang codegen] Assume arguments of __atomic_* are aligned.
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 14 14:18:02 PDT 2022
rjmccall added a comment.
The GCC documentation <https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html> really ought to specify what alignment assumptions these functions make, if any. But they control the specification here, so if they're making alignment assumptions, then I agree we probably ought to make the same assumptions.
Have we verified that this is the rule that GCC uses? Is it true even if e.g. the pointer expression is the address of a variable with a known alignment, or if the pointer has an explicitly-aligned type (e.g. with an aligned `typedef`)?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123642/new/
https://reviews.llvm.org/D123642
More information about the cfe-commits
mailing list