[llvm] [LLVM][AARCH64]Replace +sme2p1+smef16f16 by +smef16f16 (PR #88860)
Tomas Matheson via llvm-commits
llvm-commits at lists.llvm.org
Mon May 20 13:52:41 PDT 2024
tmatheson-arm wrote:
Sorry, I assumed there were some `-cc1` tests in this patch, but there are only MC tests.
> If that's what we want to achieve, the dependency resolution must not **exist** at this stage. There's no point of in saying "ok, this functionality exists, but you must not use it".
For clarity, it's the clang `-target-feature` to `featureMap` stage that this dependency resolution happens at. Historically it did not. It was a mistake to implement it, I would like to remove it, but there are now a lot of tests (again, not in this patch) depending on that feature. I would like help to reverse that step so that I can remove the half-baked dependency resolution at this `-cc1` stage.
You can see how broken it is because the appropriate preprocessor macros are not emitted:
```
$ ./build/bin/clang -cc1 -triple aarch64 -target-feature +sme2p1 -E -dM -o - ~/hello.c | rg __ARM_FEATURE
#define __ARM_FEATURE_CLZ 1
#define __ARM_FEATURE_DIRECTED_ROUNDING 1
#define __ARM_FEATURE_DIV 1
#define __ARM_FEATURE_FMA 1
#define __ARM_FEATURE_IDIV 1
#define __ARM_FEATURE_LDREX 0xF
#define __ARM_FEATURE_NUMERIC_MAXMIN 1
#define __ARM_FEATURE_UNALIGNED 1
```
> > This means that tests like `clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_bfclamp.c` are wrong, because
> > they should specify all the `-target-feature` flags that they need.
>
> Perhaps you meant some other test, this one is for S**V**E2.1.
Here is an approximate list of tests exhibiting this problem:
```
Clang :: CodeGen/aarch64-sme2-intrinsics/acle_sme2_fmlas16.c
Clang :: CodeGen/aarch64-sme2-intrinsics/acle_sme2_mopa_nonwide.c
Clang :: CodeGen/aarch64-sve2-intrinsics/acle_sve2_revd.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_bfclamp.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_bfmla_lane.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_bfmls_lane.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_bfmlsl.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_bfmul_lane.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_cntp.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_create2_bool.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_create4_bool.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_dot.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_dupq.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_extq.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_fclamp.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_fp_reduce.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_get2_bool.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_get4_bool.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_int_reduce.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_ld1.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_ld1_single.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_ldnt1.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_loads.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_pext.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_pfalse.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_pmov_to_pred.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_pmov_to_vector.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_psel_svcount.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_ptrue.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_qcvtn.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_qrshr.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_sclamp.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_set2_bool.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_set4_bool.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_st1.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_st1_single.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_stnt1.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_store.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_tblq.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_tbxq.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_uclamp.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_undef_bool.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_uzpq1.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_uzpq2.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_while_pn.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_while_x2.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_zipq1.c
Clang :: CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_zipq2.c
```
https://github.com/llvm/llvm-project/pull/88860
More information about the llvm-commits
mailing list