[JumpThreading] Skip unconditional PredBB when threading jumps through two basic blocks
Fixes https://bugs.llvm.org/show_bug.cgi?id=44922 (caused by 4698bf14) ThreadThroughTwoBasicBlocks assumes PredBBBranch is conditional. The following code can segfault. AddPHINodeEntriesForMappedBlock(PredBBBranch->getSuccessor(1), PredBB, NewBB, ValueMapping); We can also allow unconditional PredBB, but the produced code is not better. Reviewed By: kazu Differential Revision: https://reviews.llvm.org/D74747
Loading
Please sign in to comment