aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2020-12-28 23:30:38 +0300
committerRoman Lebedev <lebedev.ri@gmail.com>2020-12-28 23:31:19 +0300
commitef93f7a11c347534ac768ec8bbbed64cd20c41d2 (patch)
treef101e0a47caa8506e24bfe365d275bca3a2f489b /llvm/lib/CodeGen/MachineFunction.cpp
parentf931290308abd0eebecae385cd32ca3a25ddd9be (diff)
downloadllvm-ef93f7a11c347534ac768ec8bbbed64cd20c41d2.zip
llvm-ef93f7a11c347534ac768ec8bbbed64cd20c41d2.tar.gz
llvm-ef93f7a11c347534ac768ec8bbbed64cd20c41d2.tar.bz2
[SimplifyCFG] FoldBranchToCommonDest: gracefully handle unreachable code ()
We might be dealing with an unreachable code, so the bonus instruction we clone might be self-referencing. There is a sanity check that all uses of bonus instructions that are not in the original block with said bonus instructions are PHI nodes, and that is obviously not the case for self-referencing instructions.. So if we find such an use, just rewrite it. Thanks to Mikael Holmén for the reproducer! Fixes https://bugs.llvm.org/show_bug.cgi?id=48450#c8
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
0 files changed, 0 insertions, 0 deletions