[llvm] [ARM] Emit an error when the hard-float ABI is enabled but can't be used (PR #111334)
Chris Copeland via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 2 22:13:38 PDT 2026
================
@@ -1,4 +1,4 @@
-; RUN: llc -mtriple=arm-linux-gnueabihf -filetype=obj <%s | llvm-objdump --triple=armv7 --no-show-raw-insn -d - | FileCheck %s
+; RUN: llc -mtriple=arm-linux-gnueabi -filetype=obj <%s | llvm-objdump --triple=armv7 --no-show-raw-insn -d - | FileCheck %s
----------------
chrisnc wrote:
Ack, thanks for this pointer. Indeed, the patch as-is does not account for calling conventions that differ from the default for the ABI. I'm re-working it now to deal with this. My basic idea is to check the active calling convention and determine whether it can be implemented, and this will subsume the ABI check (which determines the calling convention absent a per-function override). To do that, I needed to change `getEffectiveCallingConv` to no longer explicitly degrade `ARM_AAPCS_VFP` to `ARM_AAPCS` for lack of fpregs or thumbv1-only (otherwise checking the calling convention will conclude that it is already valid). Let me know if you think this is a valid direction to proceed.
In the process, I encountered several tests that need updating independently of any new error: https://github.com/llvm/llvm-project/pull/213588, but one was a prerequisite to enforcing that features match the calling convention (`fp16-fusedMAC.ll` which used a thumb1-only target inadvertently, but tried to use fp features).
https://github.com/llvm/llvm-project/pull/111334
More information about the llvm-commits
mailing list