[clang] [clang][driver] Allow unaligned access on ARMv7 and higher by default (PR #82400)
David Green via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 20 11:04:39 PST 2024
================
@@ -895,19 +895,17 @@ llvm::ARM::FPUKind arm::getARMTargetFeatures(const Driver &D,
// defaults this bit to 0 and handles it as a system-wide (not
// per-process) setting. It is therefore safe to assume that ARMv7+
// Linux targets support unaligned accesses. The same goes for NaCl
- // and Windows.
- //
- // The above behavior is consistent with GCC.
+ // and Windows. However, ARM's forks of GCC and Clang both allow
+ // unaligned accesses by default for all targets. We follow this
+ // behavior and enable unaligned accesses by default for ARMv7+ targets.
+ // Users can disable behavior via compiler options (-mno-unaliged-access).
+ // See https://github.com/llvm/llvm-project/issues/59560 for more info.
----------------
davemgreen wrote:
Also, I would drop the reference to the github issue from the comment. People can inspect the git history if they need to go looking for a reason behind it.
https://github.com/llvm/llvm-project/pull/82400
More information about the cfe-commits
mailing list