[PATCH] D50040: [GuardWidening] Widen very likely non-taken br instructions
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 10 13:50:54 PDT 2018
reames accepted this revision.
reames added a comment.
This revision is now accepted and ready to land.
LGTM w/one required change before commit. I'm assuming the fix is 2-3 lines (basically adding a param pass through), if it's anything other than that, please come back for another round of review.
================
Comment at: lib/Transforms/Scalar/GuardWidening.cpp:391
auto Score =
computeWideningScore(GuardInst, GuardInstLoop, Candidate, CurLoop);
LLVM_DEBUG(dbgs() << "Score between " << *getCondition(GuardInst)
----------------
It looks like you forgot to invert the condition when checking profit. Should be an easy fix, but add a test case which shows the problem too.
https://reviews.llvm.org/D50040
More information about the llvm-commits
mailing list