Second part of pr16069
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 4 Jun 2013 14:11:59 +0000 (14:11 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 4 Jun 2013 14:11:59 +0000 (14:11 +0000)
commitbabae05237cb1914be0b2a25c56754ccc92084ee
tree0c3c007adafd0854e3bd7e63b66e3f9b931a60d9
parentdeb2e9c42f23b25dcbffa0a34b15c5d1b15f26a5
Second part of pr16069

The problem this time seems to be a thinko. We were assuming that in the CFG

A
| \
|  B
| /
C

speculating the basic block B would cause only the phi value for the B->C edge
to be speculated. That is not true, the phi's are semantically in the edges, so
if the A->B->C path is taken, any code needed for A->C is not executed and we
have to consider it too when deciding to speculate B.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183226 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/SimplifyCFG.cpp
test/Transforms/SimplifyCFG/PR16069.ll