You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Downstream Change] Add AEABI unaligned helpers to compiler-rt and make LLVM ARM lower unaligned i32/i64 loads/stores to __aeabi_uread/uwrite{4,8} #727
What is the change
When targeting ARM (in particular architectures or variants that do not allow unaligned memory accesses, e.g., with -mno-unaligned-access or older cores like ARMv6-M) the backend currently handles unaligned loads or stores by expanding them into sequences of byte/half-word loads/stores.
This change proposes to detect unaligned loads/stores of size 4 bytes (i32) or 8 bytes (i64) when alignment is insufficient, and instead emit calls to the AEABI helper functions by llvm:
• __aeabi_uread4, __aeabi_uread8 for unaligned reads
• __aeabi_uwrite4, __aeabi_uwrite8 for unaligned writes
By lowering to these functions, code size can be reduced compared to in-lined byte/half-word sequences providing they are invoked more than once across a program. This also needs to add the implementations for the __aeabi_uread and __aeabi_uwrite helper functions to compiler-rt.
Why this change cannot be done upstream
This was committed upstream after the LLVM 22 branch was created. Mostly upstream will not accept it into the 22 branch, as it is not considered critical enough for backporting.
Activity
Add AEABI unaligned helpers to compiler-rt and make ARM backend lower…
Fix comment style for Downstream issue arm#727.
Fix comment style for Downstream issue #727. (#746)
voltur01 commentedon Oct 21, 2026
One off release branch downstream change - closing.