Skip to content
Commit 13a97305 authored by Fangrui Song's avatar Fangrui Song
Browse files

[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
parent e706656a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment