Skip to content

Commit 87377b5

Browse files
mshelegoigcbot
authored andcommitted
[Autobackout][FuncReg]Revert of change: 2a7e0c6
IGCLLVM::getNonOpaquePtrEltTy elimination fix .
1 parent 1d0b907 commit 87377b5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

IGC/VectorCompiler/lib/GenXCodeGen/GenXLegalization.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1849,9 +1849,10 @@ Value *GenXLegalization::joinWrRegion(Value *PrevSliceRes, BaleInst BInst,
18491849
// last time round.
18501850
Value *In = !StartIdx ? BInst.Inst->getOperand(0) : PrevSliceRes;
18511851
if (CurSplitKind == SplitKind::SplitKind_GStore && StartIdx != 0) {
1852-
auto *SI = cast<StoreInst>(B.getHead()->Inst);
1853-
auto *Load = new LoadInst(SI->getValueOperand()->getType(),
1854-
SI->getPointerOperand(), ".gload",
1852+
Instruction *ST = B.getHead()->Inst;
1853+
IGC_ASSERT(isa<StoreInst>(ST));
1854+
auto *GV = cast<GlobalValue>(ST->getOperand(1));
1855+
auto *Load = new LoadInst(GV->getValueType(), GV, ".gload",
18551856
/*volatile*/ true, InsertBefore);
18561857
Load->setDebugLoc(BInst.Inst->getDebugLoc());
18571858
In = Load;

0 commit comments

Comments
 (0)