Issue 61439
Summary [ARM][clang] Lacking ACLE __ARM_FEATURE_MVE preprocessor #define for Cortex-M55
Labels new issue
Assignees
Reporter piotrrak
    Hi

I had no luck with enabling MVE for cortex-m55 target:

I've tried what seems to be tested in `clang/test/Preprocessor/arm-target-features.c`
[clang -target arm-arm-none-eabi -march=armv8.1-m.main+mve](https://github.com/llvm/llvm-project/blob/bc14c40dc14b8ab8f6a4ac432f70e17973d92937/clang/test/Preprocessor/arm-target-features.c#L775)
```
clang-17 -target arm-arm-none-eabi -march=armv8.1-m.main+mve -x c -E -dM empty.c -o - |grep __ARM_FEAT
#define __ARM_FEATURE_CLZ 1
#define __ARM_FEATURE_CMSE 1
#define __ARM_FEATURE_DIRECTED_ROUNDING 1
#define __ARM_FEATURE_DSP 1
#define __ARM_FEATURE_IDIV 1
#define __ARM_FEATURE_LDREX 0xf
#define __ARM_FEATURE_NUMERIC_MAXMIN 1
#define __ARM_FEATURE_QBIT 1
#define __ARM_FEATURE_SAT 1
#define __ARM_FEATURE_SIMD32 1
```

Also `+mve.fp` and `corex-m55` which seem to be there do not work.
I've tried clang-15, clang-16, clang-17 from https://apt.llvm.org/

```
clang-17 --version
Ubuntu clang version 17.0.0 (++20230313031335+71e2d7106fe5-1~exp1~20230313151429.801)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
```

No `__ARM_FEATURE_MVE` define in all cases.

Looks it was added 4 years ago in [[ARM] Add ACLE feature macros for MVE](https://github.com/llvm/llvm-project/commit/4ea248eb56cc156aac178d3e7db158f77c4eecf1) https://reviews.llvm.org/D60710

This code is still there (looking at [clang/lib/Basic/Targets/ARM.cpp#L887](https://github.com/llvm/llvm-project/blame/main/clang/lib/Basic/Targets/ARM.cpp#L887)) so expected it to work. I am bit puzzled, but can't build clang from source and debug it on this laptop.

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to