[DAGCombiner] Added SMAX/SMIN/UMAX/UMIN constant folding
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 19 Aug 2015 21:11:58 +0000 (21:11 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 19 Aug 2015 21:11:58 +0000 (21:11 +0000)
commit0898cdd5182c21090ab805fabb56136cef3ed01a
treed28c3c4da96602caf39ade5599119a5c0c2a3952
parent58f4f24a6e23b68e8c32d44819eceb7dbb2c563d
[DAGCombiner] Added SMAX/SMIN/UMAX/UMIN constant folding

We still need to add constant folding of vector comparisons to fold the tests for targets that don't support the respective min/max nodes

I needed to update 2011-12-06-AVXVectorExtractCombine to load a vector instead of using a constant vector to prevent it folding

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245503 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/SelectionDAG.h
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
test/CodeGen/X86/2011-12-06-AVXVectorExtractCombine.ll
test/CodeGen/X86/vec_minmax_sint.ll
test/CodeGen/X86/vec_minmax_uint.ll