add X86-specific DAG optimization to simplify boolean test
authorMichael Liao <michael.liao@intel.com>
Fri, 10 Aug 2012 19:58:13 +0000 (19:58 +0000)
committerMichael Liao <michael.liao@intel.com>
Fri, 10 Aug 2012 19:58:13 +0000 (19:58 +0000)
commit2a33cec66a5d1b755e2bb045bdac1690fdcff19e
treeed53af58d0f826d747c01bdca93a65e44f0240ed
parentac8a4ad47d17bac8c107d9f0e407d87befcd314e
add X86-specific DAG optimization to simplify boolean test

- if a boolean test (X86ISD::CMP or X86ISD:SUB) checks a boolean value
  generated from X86ISD::SETCC, try to simplify the boolean value
  generation and checking by reusing the original EFLAGS with proper
  condition code
- add hooks to X86 specific SETCC/BRCOND/CMOV, the major 3 places
  consuming EFLAGS

part of patches fixing PR12312

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161687 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/bool-simplify.ll [new file with mode: 0644]