1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

[VectorCombine] Remove unneeded InsertPointGuard (NFCI).

All users of the builder should set an insert point before using the
builder. There should be no need for using InsertPointGuard here.
This commit is contained in:
Florian Hahn 2021-05-25 16:58:14 +01:00
parent 1536faf532
commit 3932fb02f9

View File

@ -910,7 +910,6 @@ bool VectorCombine::scalarizeLoadExtract(Instruction &I) {
// Replace extracts with narrow scalar loads. // Replace extracts with narrow scalar loads.
for (User *U : LI->users()) { for (User *U : LI->users()) {
auto *EI = cast<ExtractElementInst>(U); auto *EI = cast<ExtractElementInst>(U);
IRBuilder<>::InsertPointGuard Guard(Builder);
Builder.SetInsertPoint(EI); Builder.SetInsertPoint(EI);
Value *GEP = Builder.CreateInBoundsGEP( Value *GEP = Builder.CreateInBoundsGEP(
FixedVT, Ptr, {Builder.getInt32(0), EI->getOperand(1)}); FixedVT, Ptr, {Builder.getInt32(0), EI->getOperand(1)});