Skip to content

Commit

Permalink
add flag restriction for resource loop
Browse files Browse the repository at this point in the history
cannot mess with flag in resource loop
  • Loading branch information
Gang Y Chen authored and igcbot committed Aug 1, 2023
1 parent 5cb62ae commit e4163de
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion IGC/Compiler/CISACodeGen/ResourceLoopAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,9 @@ bool ResourceLoopAnalysis::runOnFunction(Function &F) {
else if (I->mayReadOrWriteMemory())
LoopEnds = true;
else if (WI->isUniform(I))
LoopEnds = true;
LoopEnds = true; // avoid uniform in ballot loop
else if (I->getType()->getScalarType()->isIntegerTy(1))
LoopEnds = true; // avoid flag modification

if (LoopEnds && prevMemIter != BB->end()) {
auto PI = &*prevMemIter;
Expand Down

0 comments on commit e4163de

Please sign in to comment.