[InstCombine] Add old extract to worklist for DCE
To make sure it is removed in the same InstCombine iteration.
This commit is contained in:
parent
ae8f929b93
commit
b7e38ff223
@ -171,8 +171,11 @@ Instruction *InstCombinerImpl::scalarizePHI(ExtractElementInst &EI,
|
||||
}
|
||||
}
|
||||
|
||||
for (auto *E : Extracts)
|
||||
for (auto *E : Extracts) {
|
||||
replaceInstUsesWith(*E, scalarPHI);
|
||||
// Add old extract to worklist for DCE.
|
||||
addToWorklist(E);
|
||||
}
|
||||
|
||||
return &EI;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user