@@ -808,7 +808,7 @@ Instruction *MVEGatherScatterLowering::tryCreateIncrementingWBGatScat(
808
808
// by a constant, thus we're looking for an add of a phi and a constant
809
809
PHINode *Phi = dyn_cast<PHINode>(Offsets);
810
810
if (Phi == nullptr || Phi->getNumIncomingValues () != 2 ||
811
- Phi->getParent () != L->getHeader () || Phi->getNumUses () != 2 )
811
+ Phi->getParent () != L->getHeader () || ! Phi->hasNUses ( 2 ) )
812
812
// No phi means no IV to write back to; if there is a phi, we expect it
813
813
// to have exactly two incoming values; the only phis we are interested in
814
814
// 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,
1051
1051
// If the phi is not used by anything else, we can just adapt it when
1052
1052
// replacing the instruction; if it is, we'll have to duplicate it
1053
1053
PHINode *NewPhi;
1054
- if (Phi->getNumUses () == 2 ) {
1054
+ if (Phi->hasNUses ( 2 ) ) {
1055
1055
// No other users -> reuse existing phi (One user is the instruction
1056
1056
// we're looking at, the other is the phi increment)
1057
- if (IncInstruction->getNumUses () != 1 ) {
1057
+ if (! IncInstruction->hasOneUse () ) {
1058
1058
// If the incrementing instruction does have more users than
1059
1059
// our phi, we need to copy it
1060
1060
IncInstruction = BinaryOperator::Create (
0 commit comments