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)
commitf7bf87051acf39128aeb8ce7305a6d58067ac5ac
treec8dec463f523d871d30088dc8cd6a8b31f8e8387
parentbba9fe849526246af2b76347f9bb47995e9aaa6e
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.

llvm-svn: 179265
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/add.ll
llvm/test/CodeGen/X86/avx-brcond.ll [new file with mode: 0644]
llvm/test/CodeGen/X86/brcond.ll