[llvm] [clang] [llvm][ARM] Emit MVE .arch_extension after .fpu directive if it does not include MVE features (PR #71545)

David Spickett via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 16 01:11:46 PST 2023


================
@@ -0,0 +1,35 @@
+// RUN: %clang --target=arm-none-eabi -mcpu=cortex-m85 -mfloat-abi=hard -O2 -save-temps=obj -S -o - %s | FileCheck %s
+// RUN: %clang --target=arm-none-eabi -mcpu=cortex-m85 -mfloat-abi=hard -O2 -c -mthumb -save-temps=obj %s
+// RUN: %clang --target=arm-none-eabi -mcpu=cortex-m55 -mfloat-abi=hard -O2 -c -mthumb -save-temps=obj %s
+
+// REQUIRES: arm-registered-target
+
+// CHECK: .fpu   fpv5-d16
+// CHECK-NEXT  .arch_extension mve.fp
+
+#define DUMMY_CONST_1 (0.0012345F)
+#define DUMMY_CONST_2 (0.01F)
+#define DUMMY_CONST_3 (0.02F)
+#define DUMMY_CONST_4 (0.03F)
+#define DUMMY_CONST_5 (0.04F)
----------------
DavidSpickett wrote:

I get defining DUMMY_CONST_1 but it seems you could just write the values of the others in `foo`.

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


More information about the llvm-commits mailing list