[PATCH] D45481: [IRCE] isKnownNonNegative helper
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 10 03:22:35 PDT 2018
mkazantsev added a comment.
Code part is fine (with a nit inline). Do you have a test for which this change enabled IRCE? If yes, please add.
================
Comment at: lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp:809
+ ScalarEvolution &SE) {
+ const SCEV *Zero = SE.getConstant(BoundSCEV->getType(), 0, true);
+ return SE.isLoopEntryGuardedByCond(L, ICmpInst::ICMP_SGE, BoundSCEV, Zero);
----------------
You can use `SE.getZero(BoundSCEV->getType())`.
https://reviews.llvm.org/D45481
More information about the llvm-commits
mailing list