]> granicus.if.org Git - llvm/commit
[SelectionDAG] Optimize VSELECT->SETCC of incompatible or illegal types.
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>
Thu, 16 Mar 2017 07:17:12 +0000 (07:17 +0000)
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>
Thu, 16 Mar 2017 07:17:12 +0000 (07:17 +0000)
commit1b6f5a39a99a241e6ac271e49597f40d74dab1ab
tree2d8757ac80dc53489351588eed5752c804febf94
parenta690454389337d227d9aef388f2e17d478caf7f2
[SelectionDAG]  Optimize VSELECT->SETCC of incompatible or illegal types.

Don't scalarize VSELECT->SETCC when operands/results needs to be widened,
or when the type of the SETCC operands are different from those of the VSELECT.

(VSELECT SETCC) and (VSELECT (AND/OR/XOR (SETCC,SETCC))) are handled.

The previous splitting of VSELECT->SETCC in DAGCombiner::visitVSELECT() is
no longer needed and has been removed.

Updated tests:

test/CodeGen/ARM/vuzp.ll
test/CodeGen/NVPTX/f16x2-instructions.ll
test/CodeGen/X86/2011-10-19-widen_vselect.ll
test/CodeGen/X86/2011-10-21-widen-cmp.ll
test/CodeGen/X86/psubus.ll
test/CodeGen/X86/vselect-pcmp.ll

Review: Eli Friedman, Simon Pilgrim
https://reviews.llvm.org/D29489

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297930 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
lib/CodeGen/SelectionDAG/LegalizeTypes.h
lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp
lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
test/CodeGen/ARM/vuzp.ll
test/CodeGen/NVPTX/f16x2-instructions.ll
test/CodeGen/X86/2011-10-19-widen_vselect.ll
test/CodeGen/X86/2011-10-21-widen-cmp.ll
test/CodeGen/X86/psubus.ll
test/CodeGen/X86/vselect-pcmp.ll