Skip to content

Commit 0baa0b3

Browse files
authored
AArch64: Use use_empty instead of getNumUses == 0 (#136356)
1 parent aed4ecc commit 0baa0b3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/lib/Target/AArch64/SVEIntrinsicOpts.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -328,9 +328,9 @@ bool SVEIntrinsicOpts::optimizePredicateStore(Instruction *I) {
328328
Builder.CreateStore(BitCast->getOperand(0), Store->getPointerOperand());
329329

330330
Store->eraseFromParent();
331-
if (IntrI->getNumUses() == 0)
331+
if (IntrI->use_empty())
332332
IntrI->eraseFromParent();
333-
if (BitCast->getNumUses() == 0)
333+
if (BitCast->use_empty())
334334
BitCast->eraseFromParent();
335335

336336
return true;
@@ -386,9 +386,9 @@ bool SVEIntrinsicOpts::optimizePredicateLoad(Instruction *I) {
386386

387387
BitCast->replaceAllUsesWith(LoadPred);
388388
BitCast->eraseFromParent();
389-
if (IntrI->getNumUses() == 0)
389+
if (IntrI->use_empty())
390390
IntrI->eraseFromParent();
391-
if (Load->getNumUses() == 0)
391+
if (Load->use_empty())
392392
Load->eraseFromParent();
393393

394394
return true;

0 commit comments

Comments
 (0)