[PATCH] D94230: [AArch64][SVE] Add SVE IR pass to coalesce ptrue instrinsic calls

Peter Waller via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 11 02:27:03 PST 2021


peterwaller-arm added inline comments.


================
Comment at: llvm/lib/Target/AArch64/SVECoalescePTrues.cpp:87
+bool isSimplePTrue(IntrinsicInst *PTrue) {
+
+  // Find all users of this intrinsic that are calls to convert-to-svbool
----------------
Line 87: Nit: Extra blank.
Line 86: Currently the name suggests a property of the ptrue. The word "simple" could also conceivably have multiple meanings. The condition depends on how the ptrue is used, not "how the ptrue itself is". Suggest `isPTrueNarrowed` or similar instead.





================
Comment at: llvm/lib/Target/AArch64/SVECoalescePTrues.cpp:104
+  // Otherwise, try to find users of the convert-to-svbool intrinsics that are
+  // calls to the convert-from-svbool intrinsic, and would result in zeroing.
+  const auto *PTrueVTy = cast<VectorType>(PTrue->getType());
----------------
Clarify what is being zeroed.


================
Comment at: llvm/lib/Target/AArch64/SVECoalescePTrues.cpp:113
+
+        // Does this call result in zeroing?
+        if (IntrUserVTy->getElementCount().getKnownMinValue() >
----------------
Another possible comment clarification.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94230



More information about the llvm-commits mailing list