We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 224b280 commit dfa13c0Copy full SHA for dfa13c0
llvm/lib/CodeGen/CodeGenPrepare.cpp
@@ -7382,12 +7382,9 @@ bool CodeGenPrepare::tryToSinkFreeOperands(Instruction *I) {
7382
if (IsHugeFunc) {
7383
// Now we clone an instruction, its operands' defs may sink to this BB
7384
// now. So we put the operands defs' BBs into FreshBBs to do optimization.
7385
- for (unsigned I = 0; I < NI->getNumOperands(); ++I) {
7386
- auto *OpDef = dyn_cast<Instruction>(NI->getOperand(I));
7387
- if (!OpDef)
7388
- continue;
7389
- FreshBBs.insert(OpDef->getParent());
7390
- }
+ for (Value *Op : NI->operands())
+ if (auto *OpDef = dyn_cast<Instruction>(Op))
+ FreshBBs.insert(OpDef->getParent());
7391
}
7392
7393
NewInstructions[UI] = NI;
0 commit comments