Skip to content
Commit 9142f67e authored by Dmitry Makogon's avatar Dmitry Makogon
Browse files

[SimplifyCFG] Don't widen cond br if false branch has successors

Fixes https://github.com/llvm/llvm-project/issues/57221.

This limits the tryWidenCondBranchToCondBranch transform making it
work only if the false block of widenable condition branch
has no successors.

If that block has successors, then SimplifyCondBranchToCondBranch
may undo the transform done by tryWidenCondBranchToCondBranch, which
would lead to infinite cycle of transformation and eventually
an assert failing.

Differential Revision: https://reviews.llvm.org/D132356
parent 5d828195
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment