OSDN Git Service

Fix LoopUnswitch bug. RewriteLoopBodyWithConditionConstant can delete a dead
authorEvan Cheng <evan.cheng@apple.com>
Tue, 24 May 2011 23:12:57 +0000 (23:12 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Tue, 24 May 2011 23:12:57 +0000 (23:12 +0000)
commit424641ef83fbb99640d3e2758148a9d3ea2b3830
tree6c88b8efb55649e29eefa4d18efa6b31e0f01900
parentfef50062eae28fc6d893cd3ef528f8ca85cd50b0
Fix LoopUnswitch bug. RewriteLoopBodyWithConditionConstant can delete a dead
case of a switch instruction. Back off this optimization when this would
eliminate all of the predecessors to the latch.

Sorry, I am unable to reduce a reasonably sized test case.

rdar://9486843

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132022 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopUnswitch.cpp