[DAGCombiner] Add support for TRUNCATE + FP_EXTEND vector constant folding
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 25 Mar 2015 22:30:31 +0000 (22:30 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 25 Mar 2015 22:30:31 +0000 (22:30 +0000)
commiteb32048f8029a08074df9eb95ca3b5a9cfbaeae1
tree163b858fbb65e7e5671f09bb31b6e85ae4155203
parent00aafa5d73ebd243ab052cb3a1c82706b3ec26f8
[DAGCombiner] Add support for TRUNCATE + FP_EXTEND vector constant folding

This patch adds supports for the vector constant folding of TRUNCATE and FP_EXTEND instructions and tidies up the SINT_TO_FP and UINT_TO_FP instructions to match.

It also moves the vector constant folding for the FNEG and FABS instructions to use the DAG.getNode() functionality like the other unary instructions.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233224 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/SelectionDAGNodes.h
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
test/CodeGen/X86/vec_fpext.ll
test/CodeGen/X86/vector-trunc.ll