Implement the "if (X == 6 || X == 4)" -> "if ((X|2) == 6)" optimization.
authorBenjamin Kramer <benny.kra@googlemail.com>
Mon, 22 Nov 2010 09:45:38 +0000 (09:45 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Mon, 22 Nov 2010 09:45:38 +0000 (09:45 +0000)
commitce750f03322fe29ced3aca0718424fe173f22298
tree19b6190877ec7040a869a2fc085811d619e9f1f3
parentb05099bf42d54838f0648569d4ae1a98dfa7da7b
Implement the "if (X == 6 || X == 4)" -> "if ((X|2) == 6)" optimization.

This currently only catches the most basic case, a two-case switch, but can be
extended later.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119964 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/Target/README.txt
test/CodeGen/X86/switch-or.ll [new file with mode: 0644]