llvm-project/llvm/test/Transforms/CallSiteSplitting
Nick Desaulniers 88c965ba14 BreakCriticalEdges for callbr indirect dests
Summary:
llvm::SplitEdge was failing an assertion that the BasicBlock only had
one successor (for BasicBlocks terminated by CallBrInst, we typically
have multiple successors).  It was surprising that the earlier call to
SplitCriticalEdge did not handle the critical edge (there was an early
return).  Removing that triggered another assertion relating to creating
a BlockAddress for a BasicBlock that did not (yet) have a parent, which
is a simple order of operations issue in llvm::SplitCriticalEdge (a
freshly constructed BasicBlock must be inserted into a Function's basic
block list to have a parent).

Thanks to @nathanchance for the report.
Fixes: https://github.com/ClangBuiltLinux/linux/issues/1018

Reviewers: craig.topper, jyknight, void, fhahn, efriedma

Reviewed By: efriedma

Subscribers: eli.friedman, rnk, efriedma, fhahn, hiraditya, llvm-commits, nathanchance, srhines

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D81607
2020-06-17 11:45:06 -07:00
..
callsite-instructions-before-call.ll [llvm] Fix missing FileCheck directive colons 2020-04-06 09:59:08 -06:00
callsite-no-or-structure.ll
callsite-no-splitting.ll
callsite-split-callbr.ll BreakCriticalEdges for callbr indirect dests 2020-06-17 11:45:06 -07:00
callsite-split-debug.ll
callsite-split-or-phi.ll [CallSiteSplitting] Simplify isPredicateOnPHI & continue checking PHIs. 2020-04-02 10:11:27 +01:00
callsite-split-preserve-debug.ll
callsite-split.ll
convergent.ll
lpad.ll
musttail.ll
noduplicate.ll
split-loop.ll