ARM: Use use_empty instead of hasNUses(0) (#137337)
diff --git a/llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp b/llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
index b97ad5a..e998359 100644
--- a/llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
+++ b/llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
@@ -944,7 +944,7 @@
// Check whether all usages of this instruction are as offsets of
// gathers/scatters or simple arithmetics only used by gathers/scatters
static bool hasAllGatScatUsers(Instruction *I, const DataLayout &DL) {
- if (I->hasNUses(0)) {
+ if (I->use_empty()) {
return false;
}
bool Gatscat = true;
@@ -1099,11 +1099,11 @@
// The instruction has now been "absorbed" into the phi value
Offs->replaceAllUsesWith(NewPhi);
- if (Offs->hasNUses(0))
+ if (Offs->use_empty())
Offs->eraseFromParent();
// Clean up the old increment in case it's unused because we built a new
// one
- if (IncInstruction->hasNUses(0))
+ if (IncInstruction->use_empty())
IncInstruction->eraseFromParent();
return true;