Enhance bool simplifcation in X86 to handle more cases
authorMichael Liao <michael.liao@intel.com>
Thu, 11 Apr 2013 04:43:09 +0000 (04:43 +0000)
committerMichael Liao <michael.liao@intel.com>
Thu, 11 Apr 2013 04:43:09 +0000 (04:43 +0000)
commit959ddbb5e0e088f4d5c3f8c015de3caf0baa6e6c
tree37bea38003bfa703a6fa095535f65763b618565e
parent4eb5f18956a8e3a0652039f657272729e2381aed
Enhance bool simplifcation in X86 to handle more cases

This patch is revised based on patch from Victor Umansky
<victor.umansky@intel.com>. More cases are handled in X86's bool
simplification, i.e.
- SETCC_CARRY
- value is truncated to i1 with AND

As a by-product, PR5443 is also fixed.

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