[clang] [clang][driver] Allow unaligned access on ARMv7 and higher by default (PR #82400)

Paul Kirth via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 20 11:10:23 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.
----------------
ilovepi wrote:

Will do.

https://github.com/llvm/llvm-project/pull/82400


More information about the cfe-commits mailing list