Skip to content

Commit 9bef91e

Browse files
arsenmIanWood1
authored andcommitted
CodeGenPrepare: Check use_empty instead of getNumUses == 0 (llvm#136334)
1 parent dbc2b04 commit 9bef91e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/CodeGen/CodeGenPrepare.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4194,7 +4194,7 @@ class AddressingModeCombiner {
41944194
/// `CommonValue` may be a placeholder inserted by us.
41954195
/// If the placeholder is not used, we should remove this dead instruction.
41964196
void eraseCommonValueIfDead() {
4197-
if (CommonValue && CommonValue->getNumUses() == 0)
4197+
if (CommonValue && CommonValue->use_empty())
41984198
if (Instruction *CommonInst = dyn_cast<Instruction>(CommonValue))
41994199
CommonInst->eraseFromParent();
42004200
}

0 commit comments

Comments
 (0)