[PATCH] D61513: [AArch64][SVE2] Add SVE2 target features to backend and TargetParser

Diana Picus via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 6 02:14:09 PDT 2019


rovka added inline comments.


================
Comment at: lib/Support/AArch64TargetParser.cpp:100
+  if (Extensions & AEK_BITPERM)
+    Features.push_back("+bitperm");
   if (Extensions & AEK_RCPC)
----------------
It might be a bit long, but I'd prefer sve2-bitperm here, to avoid the kind of situation we have in the ARM backend with hwdiv / hwdiv-arm.


================
Comment at: lib/Target/AArch64/AArch64InstrInfo.td:118
+                                 AssemblerPredicate<"FeatureSVE2SHA3", "sve2-sha3">;
+def HasSVE2BitPerm   : Predicate<"Subtarget->hasSVE2()">,
+                                 AssemblerPredicate<"FeatureSVE2BitPerm", "bitperm">;
----------------
This should be Subtarget->hasSVE2BitPerm(), right?


================
Comment at: lib/Target/AArch64/AArch64Subtarget.h:142
+  bool HasSVE2SHA3 = true;
+  bool HasSVE2BitPerm = true;
+
----------------
Wouldn't it be safer to default to false? Otherwise you'd always have to check hasSVE2() first, which is a bit of a chore.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D61513





More information about the llvm-commits mailing list