Switch lowering: don't add incoming PHI values from skipped bit test MBB's (PR27135)
authorHans Wennborg <hans@hanshq.net>
Fri, 15 Apr 2016 21:45:30 +0000 (21:45 +0000)
committerHans Wennborg <hans@hanshq.net>
Fri, 15 Apr 2016 21:45:30 +0000 (21:45 +0000)
commit07f6d3a89379d615f266df16d0b076e457fa05ae
tree46cf1cf3049024d4b5dd785b07e41ff69c7a4a2f
parentc944c13dc186b57cc4e16e73c9dc5413d7b7402a
Switch lowering: don't add incoming PHI values from skipped bit test MBB's (PR27135)

After r245976, LLVM will skip the last bit test case if knows it will always be
true. However, we would still erroneously update PHI nodes with incoming values
from the MBB that would perform the final bit test, causing -verify-machineinstrs
to fail.

llvm-svn: 266479
llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
llvm/test/CodeGen/X86/switch.ll