[DAGCombiner] Vector constant folding for comparisons
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 18 Nov 2015 21:17:19 +0000 (21:17 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 18 Nov 2015 21:17:19 +0000 (21:17 +0000)
commit5c882ac1dc4af8526e45b71b05834e3105ed6c05
tree5153840f3185593ba109bb20f50f473cd81e468a
parentc931f35508d5a7eb6337f5c8845f470afb4da6a6
[DAGCombiner] Vector constant folding for comparisons

This patch adds support for vector constant folding of integer/float comparisons.

This requires FoldConstantVectorArithmetic to support scalar constant operands (in this case ISD::CONDCASE). In future we should be able to support other scalar constant types as necessary (and possibly start calling FoldConstantVectorArithmetic for all node creations)

Differential Revision: http://reviews.llvm.org/D14683

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253504 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
test/CodeGen/X86/2011-10-21-widen-cmp.ll
test/CodeGen/X86/2011-20-21-zext-ui2fp.ll
test/CodeGen/X86/vec_minmax_sint.ll
test/CodeGen/X86/vec_minmax_uint.ll