[all-commits] [llvm/llvm-project] a67a43: [ARM] Do not emit ldrexd/strexd on Cortex-M chips
Ayke via All-commits
all-commits at lists.llvm.org
Fri Feb 12 16:34:17 PST 2021
Branch: refs/heads/release/12.x
Home: https://github.com/llvm/llvm-project
Commit: a67a4346f78d856c6224578392b128ab1d55009e
https://github.com/llvm/llvm-project/commit/a67a4346f78d856c6224578392b128ab1d55009e
Author: Ayke van Laethem <aykevanlaethem at gmail.com>
Date: 2021-02-12 (Fri, 12 Feb 2021)
Changed paths:
M llvm/lib/Target/ARM/ARMISelLowering.cpp
M llvm/test/CodeGen/ARM/atomic-64bit.ll
Log Message:
-----------
[ARM] Do not emit ldrexd/strexd on Cortex-M chips
The ldrexd/strexd instructions are not supported on M-class chips, see
for example
https://developer.arm.com/documentation/dui0489/e/arm-and-thumb-instructions/memory-access-instructions/ldrex-and-strex
which says:
> All these 32-bit Thumb instructions are available in ARMv6T2 and
> above, except that LDREXD and STREXD are not available in the ARMv7-M
> architecture.
Looking at the ARMv8-M architecture, it appears that these instructions
aren't supported either. The Architecture Reference Manual lists
ldrex/strex but not ldrexd/strexd:
https://developer.arm.com/documentation/ddi0553/bn/
Godbolt example on LLVM 11.0.0, which incorrectly emits ldrexd/strexd
instructions: https://llvm.godbolt.org/z/5qqPnE
Differential Revision: https://reviews.llvm.org/D95891
(cherry picked from commit aecdf15cc7f866180dc769265b8183cad34bb33a)
More information about the All-commits
mailing list