File tree 1 file changed +2
-5
lines changed
llvm/lib/Transforms/InstCombine
1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -1975,8 +1975,6 @@ Instruction *InstCombiner::visitGetElementPtrInst(GetElementPtrInst &GEP) {
1975
1975
if (DI == -1 ) {
1976
1976
// All the GEPs feeding the PHI are identical. Clone one down into our
1977
1977
// BB so that it can be merged with the current GEP.
1978
- GEP.getParent ()->getInstList ().insert (
1979
- GEP.getParent ()->getFirstInsertionPt (), NewGEP);
1980
1978
} else {
1981
1979
// All the GEPs feeding the PHI differ at a single offset. Clone a GEP
1982
1980
// into the current block so it can be merged, and create a new PHI to
@@ -1994,11 +1992,10 @@ Instruction *InstCombiner::visitGetElementPtrInst(GetElementPtrInst &GEP) {
1994
1992
PN->getIncomingBlock (I));
1995
1993
1996
1994
NewGEP->setOperand (DI, NewPN);
1997
- GEP.getParent ()->getInstList ().insert (
1998
- GEP.getParent ()->getFirstInsertionPt (), NewGEP);
1999
- NewGEP->setOperand (DI, NewPN);
2000
1995
}
2001
1996
1997
+ GEP.getParent ()->getInstList ().insert (
1998
+ GEP.getParent ()->getFirstInsertionPt (), NewGEP);
2002
1999
GEP.setOperand (0 , NewGEP);
2003
2000
PtrOp = NewGEP;
2004
2001
}
You can’t perform that action at this time.
0 commit comments