[PATCH] D79175: [ARM][MVE] Tail-Predication: use @llvm.get.active.lane.mask to get the BTC

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 27 16:56:17 PDT 2020


efriedma added inline comments.


================
Comment at: llvm/lib/Target/ARM/MVETailPredication.cpp:348
+  Value *NumElements = Builder.CreateAdd(ScalarBTC,
+      ConstantInt::get(ScalarBTC->getType(), 1), "num.elements");
+
----------------
This addition can overflow.


================
Comment at: llvm/lib/Target/ARM/MVETailPredication.cpp:417
     Predicates.insert(Predicate);
-
-    // Step 2: emit the VCTP intrinsic representing the effect of TP.
-    InsertVCTPIntrinsic(TCP, NewPredicates);
-  }
-
-  if (!NewPredicates.size()) {
-      LLVM_DEBUG(if (!FoundScalarTC)
-                   dbgs() << "ARM TP: Can't determine loop itertion count\n");
-    return false;
+    InsertVCTPIntrinsic(ActiveLaneMask, TripCount, getVectorType(I),
+                        NewPredicates);
----------------
Do you need to check that the first argument to get_active_lane_mask is an induction variable for the loop "L"?

Do you need to check the types of the arguments to get_active_lane_mask?


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

https://reviews.llvm.org/D79175





More information about the llvm-commits mailing list