@@ -808,7 +808,7 @@ Instruction *MVEGatherScatterLowering::tryCreateIncrementingWBGatScat(
808808 // by a constant, thus we're looking for an add of a phi and a constant
809809 PHINode *Phi = dyn_cast<PHINode>(Offsets);
810810 if (Phi == nullptr || Phi->getNumIncomingValues () != 2 ||
811- Phi->getParent () != L->getHeader () || Phi->getNumUses () != 2 )
811+ Phi->getParent () != L->getHeader () || ! Phi->hasNUses ( 2 ) )
812812 // No phi means no IV to write back to; if there is a phi, we expect it
813813 // to have exactly two incoming values; the only phis we are interested in
814814 // will be loop IV's and have exactly two uses, one in their increment and
@@ -1051,10 +1051,10 @@ bool MVEGatherScatterLowering::optimiseOffsets(Value *Offsets, BasicBlock *BB,
10511051 // If the phi is not used by anything else, we can just adapt it when
10521052 // replacing the instruction; if it is, we'll have to duplicate it
10531053 PHINode *NewPhi;
1054- if (Phi->getNumUses () == 2 ) {
1054+ if (Phi->hasNUses ( 2 ) ) {
10551055 // No other users -> reuse existing phi (One user is the instruction
10561056 // we're looking at, the other is the phi increment)
1057- if (IncInstruction->getNumUses () != 1 ) {
1057+ if (! IncInstruction->hasOneUse () ) {
10581058 // If the incrementing instruction does have more users than
10591059 // our phi, we need to copy it
10601060 IncInstruction = BinaryOperator::Create (
0 commit comments