[PATCH] D132443: [LSR] Fold terminating condition to other IV when possible

Yueh-Ting (eop) Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 6 02:19:42 PDT 2022


eopXD marked an inline comment as done.
eopXD added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:6670
+  for (PHINode &PN : L->getHeader()->phis()) {
+    if (!SE.isSCEVable(PN.getType()))
+      continue;
----------------
fhahn wrote:
> it looks like there's a negative test missing with types that aren't scev-able (e.g. vector types I think).
Done, thank you for the reminder.


================
Comment at: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:6675
+    // Only speculate on affine AddRec
+    if (!AddRec || !AddRec->isAffine())
+      continue;
----------------
fhahn wrote:
> It looks like there's a test case missing where one of the phis isn't an AddRec/non-affine AddRec.
Done, thank you for the reminder.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132443



More information about the llvm-commits mailing list