[BasicBlockUtils] Allow critical edge splitting with callbr terminators
authorNikita Popov <npopov@redhat.com>
Thu, 7 Jul 2022 07:32:36 +0000 (09:32 +0200)
committerNikita Popov <npopov@redhat.com>
Fri, 8 Jul 2022 07:20:44 +0000 (09:20 +0200)
commit34a5c2bcf266bb5511791803d66304cc58418bdc
tree8f02c54f38d918a863ce3800f431af8cd5fc391e
parent9b37d48dd9c26a277c84dd0691173c83616306e2
[BasicBlockUtils] Allow critical edge splitting with callbr terminators

After D129205, we support SplitBlockPredecessors() for predecessors
with callbr terminators. This means that it is now also safe to
invoke critical edge splitting for an edge coming from a callbr
terminator. Remove checks in various passes that were protecting
against that.

Differential Revision: https://reviews.llvm.org/D129256
llvm/lib/Transforms/Scalar/GVN.cpp
llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp
llvm/test/Transforms/GVN/callbr-loadpre-critedge.ll
llvm/test/Transforms/GVN/callbr-scalarpre-critedge.ll
llvm/test/Transforms/LoopStrengthReduce/callbr-critical-edge-splitting.ll