[PATCH] D82178: [AArch64][SVE] Guard svbfloat16_t with feature macro in ACLE

Francesco Petrogalli via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 22 09:07:44 PDT 2020


fpetrogalli accepted this revision.
fpetrogalli added a comment.
This revision is now accepted and ready to land.

LGTM! Thanks.



================
Comment at: clang/utils/TableGen/SveEmitter.cpp:1092
+  OS << "#if !defined(__ARM_FEATURE_BF16_SCALAR_ARITHMETIC)\n";
+  OS << "#error \"__ARM_FEATURE_BF16_SCALAR_ARITHMETIC must be defined when "
+        "__ARM_FEATURE_SVE_BF16 is defined\"\n";
----------------
fpetrogalli wrote:
> Does it make sense to add a regression test to make sure this error is raised?
As discussed, this is not needed. The ACLE tests will catch this once we have set up the correct macros in the clang driver.


================
Comment at: clang/utils/TableGen/SveEmitter.cpp:1101
+  OS << "#if defined(__ARM_FEATURE_BF16_SCALAR_ARITHMETIC)\n";
+  OS << "#include <arm_bf16.h>\n";
   OS << "typedef __bf16 bfloat16_t;\n";
----------------
nit: maybe add a comment specifying that this include is required in the ACLE specs. 


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

https://reviews.llvm.org/D82178





More information about the cfe-commits mailing list