Skip to content

Commit e676b30

Browse files
committed
ARM: Use use_empty instead of hasNUses(0)
1 parent 346792a commit e676b30

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@ void MVEGatherScatterLowering::pushOutMulShl(unsigned Opcode, PHINode *&Phi,
944944
// Check whether all usages of this instruction are as offsets of
945945
// gathers/scatters or simple arithmetics only used by gathers/scatters
946946
static bool hasAllGatScatUsers(Instruction *I, const DataLayout &DL) {
947-
if (I->hasNUses(0)) {
947+
if (I->use_empty()) {
948948
return false;
949949
}
950950
bool Gatscat = true;
@@ -1099,11 +1099,11 @@ bool MVEGatherScatterLowering::optimiseOffsets(Value *Offsets, BasicBlock *BB,
10991099

11001100
// The instruction has now been "absorbed" into the phi value
11011101
Offs->replaceAllUsesWith(NewPhi);
1102-
if (Offs->hasNUses(0))
1102+
if (Offs->use_empty())
11031103
Offs->eraseFromParent();
11041104
// Clean up the old increment in case it's unused because we built a new
11051105
// one
1106-
if (IncInstruction->hasNUses(0))
1106+
if (IncInstruction->use_empty())
11071107
IncInstruction->eraseFromParent();
11081108

11091109
return true;

0 commit comments

Comments
 (0)