[clang] [llvm] [ARM] Emit an error when the hard-float ABI is enabled but can't be used. (PR #111334)

Chris Copeland via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 25 16:03:29 PST 2024


================
@@ -16,7 +16,7 @@
 
 // RUN: %clang --target=arm-none-eabi -mcpu=cortex-m33 -mfloat-abi=hard -O1 %s -flto=thin -c -o %t.call_thin.bc -DCALL_LIB
 // RUN: %clang --target=arm-none-eabi -mcpu=cortex-m33 -mfloat-abi=hard -O1 %s -flto=thin -c -o %t.define_thin.bc -DDEFINE_LIB
-// RUN: llvm-lto2 run -o %t.lto_thin -save-temps %t.call_thin.bc %t.define_thin.bc \
+// RUN: llvm-lto2 run --mcpu=cortex-m33 --float-abi=hard -o %t.lto_thin -save-temps %t.call_thin.bc %t.define_thin.bc \
----------------
chrisnc wrote:

What do you think about making the error only fire if any of the function's argument types or return types are floating-point? That would eliminate the need for this test change and probably several others that weren't actually using floating-point, and be more defensible in that if you encounter such a function with the ABI/feature combination being checked for, it _will_ generate incorrect code for it if not for this error.

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


More information about the cfe-commits mailing list