]> granicus.if.org Git - llvm/commit
Update phi nodes in LowerTypeTests control flow simplification
authorPeter Collingbourne <peter@pcc.me.uk>
Mon, 31 Jul 2017 20:43:07 +0000 (20:43 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Mon, 31 Jul 2017 20:43:07 +0000 (20:43 +0000)
commit1673e596c8bd30c07187ba1f71d7bdda1a2a3caa
tree180b22e5a71e1ec894ef78f4a93b321c7b35732e
parentf15adebe757b91340c7540dd1618af2aeb0d1fca
Update phi nodes in LowerTypeTests control flow simplification

D33925 added a control flow simplification for -O2 --lto-O0 builds that
manually splits blocks and reassigns conditional branches but does not
correctly update phi nodes. If the else case being branched to had
incoming phi nodes the control-flow simplification would leave phi nodes
in that BB with an unhandled predecessor.

Patch by Vlad Tsyrklevich!

Differential Revision: https://reviews.llvm.org/D36012

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309621 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/LowerTypeTests.cpp
test/Transforms/LowerTypeTests/simplify_phi.ll [new file with mode: 0644]