Skip to content

Commit adacd04

Browse files
Gang Y Chenigcbot
authored andcommitted
[Autobackout][FuncReg]Revert of change: ac0ac23
replace extract-element at its original location to preserve load-clustering effect
1 parent c69467e commit adacd04

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

IGC/Compiler/CISACodeGen/VectorPreProcess.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1550,11 +1550,10 @@ Instruction* VectorPreProcess::simplifyLoadStore(Instruction* Inst)
15501550
unsigned Idx = int_cast<unsigned>(CI->getZExtValue());
15511551
if (NewEEI[Idx] == nullptr)
15521552
{
1553-
// To preserve the order, insert next to the original EEI
1554-
NewEEI[Idx] = ExtractElementInst::Create(NewLI, CI, "", EEI);
1553+
NewEEI[Idx] = Builder.CreateExtractElement(NewLI, CI);
15551554
if (BC)
15561555
{
1557-
NewBC[Idx] = CastInst::Create(BC->getOpcode(), NewEEI[Idx], DstEltTy, "", EEI);
1556+
NewBC[Idx] = Builder.CreateBitCast(NewEEI[Idx], DstEltTy);
15581557
dyn_cast<BitCastInst>(NewBC[Idx])->setDebugLoc(BC->getDebugLoc());
15591558
}
15601559
}

0 commit comments

Comments
 (0)