[clang] Add SME2 builtins for pfalse and ptrue (PR #71953)

Sander de Smalen via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 6 05:17:27 PST 2023


================
@@ -1981,6 +1979,11 @@ def SVCNTP_COUNT : SInst<"svcntp_{d}", "n}i", "QcQsQiQl", MergeNone, "aarch64_sv
 defm SVREVD : SInstZPZ<"svrevd", "csilUcUsUiUl", "aarch64_sve_revd">;
 }
 
+let TargetGuard = "sve2p1|sme2" in {
+  def SVPTRUE_COUNT  : SInst<"svptrue_{d}", "}v", "QcQsQiQl", MergeNone, "aarch64_sve_ptrue_{d}", [IsOverloadNone, IsStreaming], []>;
----------------
sdesmalen-arm wrote:

```suggestion
  def SVPTRUE_COUNT  : SInst<"svptrue_{d}", "}v", "QcQsQiQl", MergeNone, "aarch64_sve_ptrue_{d}", [IsOverloadNone, IsStreamingCompatible], []>;
```
As pointed out [here](https://github.com/llvm/llvm-project/pull/71927/files#r1395522522), this will need an attribute like `IsStreamingOrHasSVE2p1`, for which the compiler will give a diagnostic when compiling for +sme2 and the function is not in streaming mode.

To move this patch forward without that diagnostic, you could make this `IsStreamingCompatible` for now. Can you also add a `FIXME` to say we need to change this later?

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


More information about the cfe-commits mailing list