Don't add CFG edges for redundant conditional branches.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Mon, 20 Aug 2012 21:39:52 +0000 (21:39 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Mon, 20 Aug 2012 21:39:52 +0000 (21:39 +0000)
commite7fdef420d0c8a825555d246da259342c48bd527
tree547217afeba3ac83e232e628a24c768f2ab6bf87
parent2c5a960b0eae0634da6e1854111b35f475e65335
Don't add CFG edges for redundant conditional branches.

IR that hasn't been through SimplifyCFG can look like this:

  br i1 %b, label %r, label %r

Make sure we don't create duplicate Machine CFG edges in this case.

Fix the machine code verifier to accept conditional branches with a
single CFG edge.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162230 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/MachineVerifier.cpp
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
test/CodeGen/ARM/constants.ll