Skip to content

Commit 559a50c

Browse files
authored
SimplifyIndVar: Use use_empty instead of hasNUses(0) (#137346)
1 parent 332e181 commit 559a50c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Utils/SimplifyIndVar.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2085,7 +2085,7 @@ PHINode *WidenIV::createWideIV(SCEVExpander &Rewriter) {
20852085
// if the cast node is an inserted instruction without any user, we should
20862086
// remove it to make sure the pass don't touch the function as we can not
20872087
// wide the phi.
2088-
if (ExpandInst->hasNUses(0) &&
2088+
if (ExpandInst->use_empty() &&
20892089
Rewriter.isInsertedInstruction(cast<Instruction>(ExpandInst)))
20902090
DeadInsts.emplace_back(ExpandInst);
20912091
return nullptr;

0 commit comments

Comments
 (0)