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)
commit0867b151c94098b7282530827b7b27f18a03bef9
tree5c78a1c3e79972bfd51dce07ca2a9db65348345a
parentccf5b32d216a6fe9ed48b5b910ae0df8849357eb
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.

llvm-svn: 235608
14 files changed:
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
llvm/lib/Target/PowerPC/PPCEarlyReturn.cpp
llvm/test/CodeGen/ARM/ifcvt3.ll
llvm/test/CodeGen/ARM/struct-byval-frame-index.ll
llvm/test/CodeGen/Generic/MachineBranchProb.ll
llvm/test/CodeGen/PowerPC/early-ret.ll
llvm/test/CodeGen/PowerPC/mcm-5.ll
llvm/test/CodeGen/PowerPC/mcm-obj.ll
llvm/test/CodeGen/X86/pic_jumptable.ll
llvm/test/CodeGen/X86/switch-bt.ll
llvm/test/CodeGen/X86/switch.ll [new file with mode: 0644]
llvm/test/MC/ARM/data-in-code.ll