mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[InstCombine] Erase old instruction when replacing extractelements
As we are not returning the result of replaceInstUsesWith(), so we need to clean up ourselves. NFC apart from worklist order.
This commit is contained in:
parent
00a4727da6
commit
86d202f6d2
@ -597,6 +597,7 @@ static void replaceExtractElements(InsertElementInst *InsElt,
|
||||
auto *NewExt = ExtractElementInst::Create(WideVec, OldExt->getOperand(1));
|
||||
NewExt->insertAfter(OldExt);
|
||||
IC.replaceInstUsesWith(*OldExt, NewExt);
|
||||
IC.eraseInstFromFunction(*OldExt);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user