LSR fix: broaden the check for loop preheaders.
authorAndrew Trick <atrick@apple.com>
Tue, 17 Jan 2012 06:45:52 +0000 (06:45 +0000)
committerAndrew Trick <atrick@apple.com>
Tue, 17 Jan 2012 06:45:52 +0000 (06:45 +0000)
commit0f080913d1ff80bb61476724304359e14822b193
tree12ec273d7c15379c36ff93a3ce7df448b7642036
parent37c2677fbcff1187106c579abfbd498aac739c2a
LSR fix: broaden the check for loop preheaders.

It's becoming clear that LoopSimplify needs to unconditionally create loop preheaders. But that is a bigger fix. For now, continuing to hack LSR.
Fixes rdar://10701050 "Cannot split an edge from an IndirectBrInst" assert.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148288 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopStrengthReduce.cpp
test/Transforms/LoopStrengthReduce/2012-01-16-nopreheader.ll [new file with mode: 0644]