Skip to content

Commit be325aa

Browse files
committed
Address review comment
1 parent 4d51e3a commit be325aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Utils/SimplifyCFG.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1875,7 +1875,7 @@ bool SimplifyCFGOpt::hoistCommonCodeFromSuccessors(Instruction *TI,
18751875
// by an `unreachable` inst. Since executing `unreachable` inst is an UB, we
18761876
// can relax the condition based on the assumptiom that the program would
18771877
// never enter Succ and trigger an UB.
1878-
if (isa<UnreachableInst>(Succ->getFirstNonPHIOrDbgOrLifetime()))
1878+
if (isa<UnreachableInst>(*Succ->begin()))
18791879
continue;
18801880
return false;
18811881
}

0 commit comments

Comments
 (0)