[PATCH] D86303: [ARM][MVE] Tail-predication: remove the BTC + 1 overflow checks

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 24 04:15:07 PDT 2020


samparker added a comment.

This looks much more simple :)



================
Comment at: llvm/lib/Target/ARM/MVETailPredication.cpp:377
+  // 1) TODO: Check that the TripCount (TC) belongs to this loop (originally).
+  auto *TCUse = ActiveLaneMask->getOperand(1);
 
----------------
nit: maybe something more descriptive that highlights that this is the original scalar trip count or the number of elements.


================
Comment at: llvm/lib/Target/ARM/MVETailPredication.cpp:394
   //
-  auto *TC = SE->getSCEV(TripCount);
+  auto *TCDef = SE->getSCEV(TripCount);
   unsigned SizeInBits = TripCount->getType()->getScalarSizeInBits();
----------------
same kind of nit, I guess having scalar and vector trip count names would be most clear?


================
Comment at: llvm/lib/Target/ARM/MVETailPredication.cpp:399
   uint64_t MaxMinusVW = Diff.getZExtValue();
-  uint64_t UpperboundTC = SE->getSignedRange(TC).getUpper().getZExtValue();
+  uint64_t UpperboundTC = SE->getSignedRange(TCDef).getUpper().getZExtValue();
 
----------------
Could you add a comment on why we're using SignedRange here? And below for the ranges and ceiling.


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

https://reviews.llvm.org/D86303



More information about the llvm-commits mailing list