diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp index b62f19eeed64f..f2bc6968c3e87 100644 --- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp +++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp @@ -3505,7 +3505,7 @@ bool InstCombiner::run() { // Get the block the use occurs in. if (PHINode *PN = dyn_cast(UserInst)) - UserParent = PN->getIncomingBlock(*I->use_begin()); + UserParent = PN->getIncomingBlock(*SingleUse); else UserParent = UserInst->getParent();