sdesmalen added a comment.

You'll want to rebase your patch on top of latest main, since D105432 
<https://reviews.llvm.org/D105432> moved around the call to `getMaxVScale()` in 
AArch64TargetTransformInfo.cpp.



================
Comment at: clang/lib/Basic/Targets/AArch64.cpp:433
+  }
+  if (hasFeature("sve")) {
+    return std::pair<unsigned, unsigned>(0, 16);
----------------
nit: unnecessary curly braces.


================
Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:499
 
   // Add vscale attribute if appropriate.
+  Optional<std::pair<unsigned, unsigned>> VScaleRange =
----------------
nit: `vscale_range`


================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:1424
   ElementCount LegalVF = LT.second.getVectorElementCount();
-  Optional<unsigned> MaxNumVScale = getMaxVScale();
+  Optional<unsigned> MaxNumVScale;
+  if (I->getFunction()->hasFnAttribute(Attribute::VScaleRange)) {
----------------
This can drop the Optional now.

I also think asserting the attribute must be set is a bit of a strong 
requirement? Maybe we can return an Invalid instead if the attribute is not set.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106277

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to