If converter was being too cute. It look for root BBs (which don't have
authorEvan Cheng <evan.cheng@apple.com>
Wed, 27 Apr 2011 19:32:43 +0000 (19:32 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Wed, 27 Apr 2011 19:32:43 +0000 (19:32 +0000)
commit309db7c947de7f0f9730dff5f95bc1cc5bd1db7d
treef274f3ca9e79981b0157f28c874da2f367347c34
parentbddc1ca18a8ca23f6f145d2f5d006fa07e72a870
If converter was being too cute. It look for root BBs (which don't have
successors) and use inverse depth first search to traverse the BBs. However
that doesn't work when the CFG has infinite loops. Simply do a linear
traversal of all BBs work just fine.

rdar://9344645

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130324 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/IfConversion.cpp
test/CodeGen/ARM/2011-04-27-IfCvtBug.ll [new file with mode: 0644]