[llvm] [ARM] Don't try to emit AEABI libcalls for non-AEABI targets (PR #207813)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 6 14:48:23 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- llvm/lib/Target/ARM/ARMISelLowering.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp
index d7424f550..a1411145a 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -9858,12 +9858,11 @@ SDValue ARMTargetLowering::LowerAEABIUnalignedStore(SDValue Op,
Align Alignment = ST->getAlign();
const DataLayout &DL = DAG.getDataLayout();
bool AllowsUnaligned = Subtarget->allowsUnalignedMem();
- RTLIB::Libcall LC =
- (MemVT == MVT::i32) ? RTLIB::AEABI_UWRITE4 : RTLIB::AEABI_UWRITE8;
+ RTLIB::Libcall LC =
+ (MemVT == MVT::i32) ? RTLIB::AEABI_UWRITE4 : RTLIB::AEABI_UWRITE8;
if (MF.getFunction().hasMinSize() && !AllowsUnaligned &&
- Alignment <= llvm::Align(2) &&
- DAG.getLibcalls().getLibcallImpl(LC)) {
+ Alignment <= llvm::Align(2) && DAG.getLibcalls().getLibcallImpl(LC)) {
SDLoc dl(Op);
@@ -9872,7 +9871,6 @@ SDValue ARMTargetLowering::LowerAEABIUnalignedStore(SDValue Op,
if (ST->isTruncatingStore())
StoreVal = DAG.getNode(ISD::TRUNCATE, dl, MemVT, ST->getOperand(1));
-
MakeLibCallOptions Opts;
auto CallResult =
makeLibCall(DAG, LC, MVT::isVoid, {StoreVal, ST->getBasePtr()}, Opts,
``````````
</details>
https://github.com/llvm/llvm-project/pull/207813
More information about the llvm-commits
mailing list