Skip to content

Commit 0bed8a9

Browse files
davidjwoosys_zuul
authored andcommitted
Fixed assertion in GenUpdateCB
GenUpdateCB was incorrectly identifying constant buffer loads with an index sourced from a phi node as having a constant index. This has been fixed. Change-Id: Iff42751f9dd48c85b960eef575c5f6457880063a
1 parent 8904859 commit 0bed8a9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

IGC/Compiler/GenUpdateCB.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,11 @@ bool GenUpdateCB::isConstantBufferLoad(LoadInst* inst, unsigned& bufId)
9696
{
9797
if (IntToPtrInst * itop = dyn_cast<IntToPtrInst>(inst->getOperand(0)))
9898
{
99-
if (!dyn_cast<Constant>(itop->getOperand(0)))
99+
if (isa<Constant>(itop->getOperand(0)))
100100
{
101-
return false;
101+
return true;
102102
}
103103
}
104-
return true;
105104
}
106105
return false;
107106
}

0 commit comments

Comments
 (0)