Skip to content

Commit 7fd15c0

Browse files
Jay-Jiewu-Lusys_zuul
authored andcommitted
Do not mergeload if extractelement index is not constant
Change-Id: I9baf8bb51af81aa900c674a792a1cba337751fb7
1 parent d82d5e3 commit 7fd15c0

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

IGC/Compiler/CISACodeGen/ConstantCoalescing.cpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -835,10 +835,6 @@ void ConstantCoalescing::MergeScatterLoad(Instruction* load,
835835
if (start_adj == 0 && size_adj == 0)
836836
{
837837
splitter = FindOrAddChunkExtract(cov_chunk, eltid);
838-
if (!splitter)
839-
{
840-
return;
841-
}
842838
}
843839
else if (start_adj > 0)
844840
{
@@ -1132,10 +1128,6 @@ void ConstantCoalescing::MergeUniformLoad(Instruction* load,
11321128
if (start_adj == 0 && size_adj == 0)
11331129
{
11341130
splitter = FindOrAddChunkExtract(cov_chunk, eltid);
1135-
if (!splitter)
1136-
{
1137-
return;
1138-
}
11391131
}
11401132
else if (start_adj > 0)
11411133
{
@@ -1508,8 +1500,8 @@ Instruction* ConstantCoalescing::FindOrAddChunkExtract(BufChunk* cov_chunk, uint
15081500
assert(usei && isa<ExtractElementInst>(usei));
15091501
ConstantInt* e_idx = dyn_cast<ConstantInt>(usei->getOperand(1));
15101502
if (!e_idx)
1511-
{ //todo: temp fix, enhance later
1512-
return nullptr;
1503+
{
1504+
continue;
15131505
}
15141506
assert(e_idx);
15151507
uint val = (uint)e_idx->getZExtValue();

0 commit comments

Comments
 (0)