OSDN Git Service

Fix PR12312
authorMichael Liao <michael.liao@intel.com>
Tue, 28 Aug 2012 03:34:40 +0000 (03:34 +0000)
committerMichael Liao <michael.liao@intel.com>
Tue, 28 Aug 2012 03:34:40 +0000 (03:34 +0000)
commitdbf8b5be977b79a7abd6bbdc38561b3a5164d195
treea98d4d5ffc5a1ada2a56bd2b0892876d201c04b0
parent325907d0860f8316edcc3bb00bf7b8b04497c177
Fix PR12312

- Add a target-specific DAG optimization to recognize a pattern PTEST-able.
  Such a pattern is a OR'd tree with X86ISD::OR as the root node. When
  X86ISD::OR node has only its flag result being used as a boolean value and
  all its leaves are extracted from the same vector, it could be folded into an
  X86ISD::PTEST node.

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