[LICM] Store sink and indirectbr instructions
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Fri, 28 Nov 2014 19:47:46 +0000 (19:47 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Fri, 28 Nov 2014 19:47:46 +0000 (19:47 +0000)
commit46d5bf29820569471399c81caa1870f04223d23f
treebd3707955c8e3b0e5f685ff2c8cb10234ea4bb13
parentbc7ba2c7667b8b5b5563b3b1429ca70468d0f251
[LICM] Store sink and indirectbr instructions

Loop simplify skips exit-block insertion when exits contain indirectbr
instructions. This leads to an assertion in LICM when trying to sink
stores out of non-dedicated loop exits containing indirectbr
instructions. This patch fix this issue by re-checking for dedicated
exits in LICM prior to store sink attempts.

Differential Revision: http://reviews.llvm.org/D6414

rdar://problem/18943047

llvm-svn: 222927
llvm/lib/Transforms/Scalar/LICM.cpp
llvm/test/Transforms/LICM/sinking.ll