[PATCH] D82450: [AArch64][SVE] Add multiclass for bfloat16 intrinsic definitions

Sander de Smalen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 24 05:54:45 PDT 2020


sdesmalen added inline comments.


================
Comment at: clang/include/clang/Basic/arm_sve.td:264
+                     list<string> arch_features = []> {
+  let ArchGuard = !foldl("", arch_features, lhs, rhs,
+                         lhs # !if(!ne(lhs, ""), " && ", "") # rhs) in {
----------------
I'd rather see that we define ArchGuard as a list of strings, and then do a simple `!listconcat` for each of the features. Then we can do the expansion to the eventual `#if defined (pred1 && pred2 && ... predN)` in `SveEmitter.cpp`. There you can get the ArchGuard as a `std::vector<StringRef>`.

I also think the current implementation isn't correct, because it misses the encapsulating `defined(...)` ?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82450





More information about the cfe-commits mailing list