Re-commit r235560: Switch lowering: extract jump tables and bit tests before building...
authorHans Wennborg <hans@hanshq.net>
Thu, 23 Apr 2015 16:45:24 +0000 (16:45 +0000)
committerHans Wennborg <hans@hanshq.net>
Thu, 23 Apr 2015 16:45:24 +0000 (16:45 +0000)
commitdefaf830f9a803fcc44e85c90b26542e38546a03
treecd1d92849038cbfac60459a770f5c36ba1c7698f
parent08aea0a553b440803fa0ffbd7d11ff7b622427e4
Re-commit r235560: Switch lowering: extract jump tables and bit tests before building binary tree (PR22262)

Third time's the charm. The previous commit was reverted as a
reverse for-loop in SelectionDAGBuilder::lowerWorkItem did 'I--'
on an iterator at the beginning of a vector, causing asserts
when using debugging iterators. This commit fixes that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235608 91177308-0d34-0410-b5e6-96231b3b80d8
14 files changed:
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
lib/Target/PowerPC/PPCEarlyReturn.cpp
test/CodeGen/ARM/ifcvt3.ll
test/CodeGen/ARM/struct-byval-frame-index.ll
test/CodeGen/Generic/MachineBranchProb.ll
test/CodeGen/PowerPC/early-ret.ll
test/CodeGen/PowerPC/mcm-5.ll
test/CodeGen/PowerPC/mcm-obj.ll
test/CodeGen/X86/pic_jumptable.ll
test/CodeGen/X86/switch-bt.ll
test/CodeGen/X86/switch.ll [new file with mode: 0644]
test/MC/ARM/data-in-code.ll