[PATCH] D156109: [AArch64][SME] Create new interface for isFullSVEAvailable.

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 31 03:17:52 PDT 2023


sdesmalen added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64Subtarget.cpp:488
+  // as we don't yet support the feature in LLVM.
+  return hasSVEorSME() && !StreamingSVEMode && !StreamingCompatibleSVEMode &&
+         !ForceStreamingCompatibleSVE;
----------------
david-arm wrote:
> Perhaps it's worth being consistent with `isNeonAvailable`and using the `isStreaming` and `isStreamingCompatible` interfaces?
Thanks, good point.


================
Comment at: llvm/lib/Target/AArch64/AArch64Subtarget.h:229
+    // By returning '0' here, we disable vectorization.
+    if (!isFullSVEAvailable() && !isNeonAvailable())
       return 0;
----------------
david-arm wrote:
> Do we need to also check the same get-out clause that we do in AArch64TargetTransformInfo.cpp, i.e. `EnableScalableAutovecInStreamingMode`?
Possibly, but that requires changing the interface for getMinVectorRegisterBitWidth to also take the RegisterKind.
We'd rather be conservative at first and disable the automatic use of vector instructions. Changing this interface would be a step towards being 'less conservative'.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D156109



More information about the llvm-commits mailing list