[PATCH] D89550: [IndVars] Recognize 'sub nuw' expressed as 'add' for widening

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 11 04:18:17 PST 2020


fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/SimplifyIndVar.cpp:1552
+    const SCEV *RHS = SE->getSCEV(OBO->getOperand(1));
+    auto GEPred = ICmpInst::ICMP_UGE;
+    if (!SE->isKnownNegative(RHS))
----------------
tiny nit: perhaps move just before use? Or inline.


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

https://reviews.llvm.org/D89550



More information about the llvm-commits mailing list