Skip to content

Commit 6f4702a

Browse files
committed
add replaceAllUsesWith back to update old gep to new gep
1 parent 19668a1 commit 6f4702a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

llvm/lib/Target/DirectX/DXILLegalizePass.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ static void fixI8UseChain(Instruction &I,
195195
Builder.CreateGEP(ElementType, BasePtr, Builder.getInt32(Index),
196196
GEP->getName(), GEP->getNoWrapFlags());
197197
ReplacedValues[GEP] = NewGEP;
198+
GEP->replaceAllUsesWith(NewGEP);
198199
ToRemove.push_back(GEP);
199200
}
200201
}

0 commit comments

Comments
 (0)