git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237224
91177308-0d34-0410-b5e6-
96231b3b80d8
/// hasLoopInvariantOperands - Return true if all the operands of the
/// specified instruction are loop invariant.
bool Loop::hasLoopInvariantOperands(const Instruction *I) const {
- for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i)
- if (!isLoopInvariant(I->getOperand(i)))
+ for (auto &Op : I->operands())
+ if (!isLoopInvariant(Op))
return false;
return true;