[llvm] [AArch64] Added feature dependencies for SME2p1 to TargetParser (PR #81860)

Momchil Velikov via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 20 05:00:27 PST 2024


momchil-velikov wrote:

> Yes it could be like that. I was just wondering if there is not a better way than creating dummy programs and seeing if they compile. We have a test in aarch64-implied-sme-features.c which tests this nicely like this :
> 
> ```
> // RUN: %clang -target aarch64-linux-gnu -march=armv8-a+sme %s -### 2>&1 | FileCheck %s --check-prefix=SME-IMPLY
> // SME-IMPLY: "-target-feature" "+bf16"{{.*}} "-target-feature" "+sme"
> ```
> 
> Unfortunately this doesn't work with -cc1 and I was wondering if there is not a way to do something similiar for -cc1 that I am missing. If not I will create the dummy test.

Add something like
```
// RUN: %clang_cc1  -triple aarch64-linux -target-feature +sme2p1 -S  -fsyntax-only -verify %s

#include <arm_sme.h>

void f(svfloat32_t x) {}

// expected-no-diagnostics
```


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


More information about the llvm-commits mailing list