summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorAhmed Bougacha <ahmed.bougacha@gmail.com>2014-10-23 22:49:25 +0000
committerAhmed Bougacha <ahmed.bougacha@gmail.com>2014-10-23 22:49:25 +0000
commit7daf3b89f9e6d1661adc5a378934405b2a2427a9 (patch)
treebe8de8aae6e49d4aa2a26aa45b6197a5197e0d01 /llvm/lib/CodeGen/SelectionDAG
parentec53c299320e6d38c40b28b70de31e594e755f23 (diff)
downloadbcm5719-llvm-7daf3b89f9e6d1661adc5a378934405b2a2427a9.tar.gz
bcm5719-llvm-7daf3b89f9e6d1661adc5a378934405b2a2427a9.zip
[SelectionDAG] Teach the vector scalarizer about FP conversions.
This adds support for legalization of instructions of the form: [fp_conv] <1 x i1> %op to <1 x double> where fp_conv is one of fpto[us]i, [us]itofp. This used to assert because they were simply missing from the vector operand scalarizer. A similar problem arose in r190830, with trunc instead. Fixes PR20778. Differential Revision: http://reviews.llvm.org/D5810 llvm-svn: 220533
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
index 546cac6a350..68187dd0b8c 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
@@ -411,6 +411,10 @@ bool DAGTypeLegalizer::ScalarizeVectorOperand(SDNode *N, unsigned OpNo) {
case ISD::ZERO_EXTEND:
case ISD::SIGN_EXTEND:
case ISD::TRUNCATE:
+ case ISD::FP_TO_SINT:
+ case ISD::FP_TO_UINT:
+ case ISD::SINT_TO_FP:
+ case ISD::UINT_TO_FP:
Res = ScalarizeVecOp_UnaryOp(N);
break;
case ISD::CONCAT_VECTORS:
OpenPOWER on IntegriCloud