[PATCH] D50040: [GuardWidening] Widen very likely non-taken br instructions
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 12 20:26:56 PDT 2018
mkazantsev added inline comments.
================
Comment at: lib/Transforms/Scalar/GuardWidening.cpp:391
auto Score =
computeWideningScore(GuardInst, GuardInstLoop, Candidate, CurLoop);
LLVM_DEBUG(dbgs() << "Score between " << *getCondition(GuardInst)
----------------
reames wrote:
> 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.
I'm not sure what do you mean. This function only checks if we are hoisting out of loop or not and availability of condition at candidate's point. How can inversion of condition affect that?
https://reviews.llvm.org/D50040
More information about the llvm-commits
mailing list