[PATCH] D82429: [sve][acle] Add some C intrinsics for brain float types.

Cullen Rhodes via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 25 09:07:40 PDT 2020


c-rhodes accepted this revision.
c-rhodes added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/test/CodeGen/aarch64-sve2-intrinsics/acle_sve2_tbl2-bfloat.c:7
+// RUN: %clang_cc1 -D__ARM_FEATURE_SVE -D__ARM_FEATURE_SVE2 -D__ARM_FEATURE_BF16_SCALAR_ARITHMETIC -triple aarch64-none-linux-gnu -target-feature +sve2 -target-feature +bf16 -fallow-half-arguments-and-returns -fsyntax-only -verify -verify-ignore-unexpected=error -verify-ignore-unexpected=note %s
+// R UN: %clang_cc1 -D__ARM_FEATURE_SVE -D__ARM_FEATURE_SVE2 -D__ARM_FEATURE_BF16_SCALAR_ARITHMETIC -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2 -target-feature +bf16 -fallow-half-arguments-and-returns -fsyntax-only -verify=overload-bf16 -verify-ignore-unexpected=error -verify-ignore-unexpected=note %s
+
----------------
c-rhodes wrote:
> fpetrogalli wrote:
> > I could do with an extra pair of eyes here: I can't figure out why the warning raised by this run is not detected by the `overload-bf16-warning` below... (Same for the same line I have added in the test for tbx).
> Ah, it works in the example I linked because `whilerw` / `whilewr` uses the scalar `bfloat16_t`, whereas this is using sizeless type which is predicated on `-D__ARM_FEATURE_SVE_BF16` so we get:
> 
> ```error: 'error' diagnostics seen but not expected:
>   File /home/culrho01/llvm-project/clang/test/CodeGen/aarch64-sve2-intrinsics/acle_sve2_tbl2-bfloat.c Line 18: unknown type name 'svbfloat16_t'; did you mean 'svfloat16_t'?
>   File /home/culrho01/llvm-project/clang/test/CodeGen/aarch64-sve2-intrinsics/acle_sve2_tbl2-bfloat.c Line 18: unknown type name 'svbfloat16x2_t'; did you mean 'svfloat16x2_t'?```
> 
> I'm not sure if/how we can test this for the overloaded form
I'm not sure if what I suggested makes sense - trying to do what we've done in the sve2 acle tests where we expect an implicit declaration warning for overloaded/non-overloaded intrinsics if the sve2 feature isn't enabled. I guess it's different for BF16 as the types are guarded on the feature macro in the ACLE, for whatever reason we get the same warning for the non-overloaded intrinsics but an error for the overloaded ones. I think we can be pretty confident `+bf16` is required as the test will fail otherwise, but it's tricky trying to isolate an error implying the macro is missing on the intrinsic. FWIW we don't test this for SVE either, I think we can skip this test for the overloaded form, may as well keep the non-overloaded one in if it works.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82429/new/

https://reviews.llvm.org/D82429





More information about the cfe-commits mailing list