Skip to content

Commit b5a622a

Browse files
skachkov-inteligcbot
authored andcommitted
Search for genx.output.1 intrinsics not
only in return blocks (some execution paths may have callable instead)
1 parent 216ede9 commit b5a622a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

IGC/VectorCompiler/lib/GenXCodeGen/GenXCoalescing.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1552,14 +1552,14 @@ void GenXCoalescing::coalesceOutputArgs(FunctionGroup *FG) {
15521552
return nullptr;
15531553
};
15541554

1555-
// Iterate over all exit blocks of this function and coalesce corresponding
1556-
// output argument with genx.output.1 intrinsic (assuming that their number
1557-
// and ordering are exactly the same).
1555+
// Iterate over all basic blocks with genx.output.1 intrinsics and coalesce
1556+
// corresponding output argument with intrinsic argument (assuming that their
1557+
// number and ordering are exactly the same).
15581558
for (auto &BB : *F) {
1559-
if(!isa<ReturnInst>(BB.getTerminator()))
1559+
CallInst *CI = GetNextGenXOutput(BB.getFirstNonPHI());
1560+
if (!CI)
15601561
continue;
15611562

1562-
CallInst *CI = GetNextGenXOutput(BB.getFirstNonPHI());
15631563
for (auto Arg : OutputArgs) {
15641564
IGC_ASSERT(CI && "No genx.output.1 intrinsic for output argument");
15651565

0 commit comments

Comments
 (0)