forked from OSchip/llvm-project
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:
parent
b43027d1e0
commit
ee00abe5e6
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue