Fix llvm/llvm/lib/Transforms/Utils/LoopUnroll.cpp:285:53: error: suggest

parentheses around '&&' within '||' [-Werror=parentheses].

llvm-svn: 263525
This commit is contained in:
Eric Christopher 2016-03-15 02:19:06 +00:00
parent b43027d1e0
commit ee00abe5e6
1 changed files with 9 additions and 11 deletions

View File

@ -275,17 +275,15 @@ bool llvm::UnrollLoop(Loop *L, unsigned Count, unsigned TripCount,
// Loops containing convergent instructions must have a count that divides
// their TripMultiple.
DEBUG(
bool HasConvergent = false;
for (auto &BB : L->blocks())
for (auto &I : *BB)
if (auto CS = CallSite(&I))
HasConvergent |= CS.isConvergent();
assert(
!HasConvergent || TripMultiple % Count == 0 &&
"Unroll count must divide trip multiple if loop contains a convergent "
"operation.");
);
DEBUG(bool HasConvergent = false;
for (auto &BB
: L->blocks()) for (auto &I
: *BB) if (auto CS = CallSite(&I))
HasConvergent |= CS.isConvergent();
assert((!HasConvergent || TripMultiple % Count == 0) &&
"Unroll count must divide trip multiple if loop contains a "
"convergent "
"operation."););
// Don't output the runtime loop prolog if Count is a multiple of
// TripMultiple. Such a prolog is never needed, and is unsafe if the loop
// contains a convergent instruction.