Skip to content

Commit 2a7e0c6

Browse files
mshelegoigcbot
authored andcommitted
IGCLLVM::getNonOpaquePtrEltTy elimination fix
.
1 parent 5400f43 commit 2a7e0c6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

IGC/VectorCompiler/lib/GenXCodeGen/GenXLegalization.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1849,10 +1849,9 @@ 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-
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",
1852+
auto *SI = cast<StoreInst>(B.getHead()->Inst);
1853+
auto *Load = new LoadInst(SI->getValueOperand()->getType(),
1854+
SI->getPointerOperand(), ".gload",
18561855
/*volatile*/ true, InsertBefore);
18571856
Load->setDebugLoc(BInst.Inst->getDebugLoc());
18581857
In = Load;

0 commit comments

Comments
 (0)