]> granicus.if.org Git - llvm/commitdiff
Legalize support for fpextend of vector. PR9309.
authorDuncan Sands <baldrick@free.fr>
Sun, 27 Feb 2011 14:41:27 +0000 (14:41 +0000)
committerDuncan Sands <baldrick@free.fr>
Sun, 27 Feb 2011 14:41:27 +0000 (14:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126574 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
test/CodeGen/Generic/2011-02-27-Fpextend.ll [new file with mode: 0644]

index 182f8fcbfbf3e2e923d596e39ba3a55c32426582..8e02e982ebf65cd1bfc71c3b3fbe50a8b2fdbeb8 100644 (file)
@@ -440,6 +440,7 @@ void DAGTypeLegalizer::SplitVectorResult(SDNode *N, unsigned ResNo) {
   case ISD::FCEIL:
   case ISD::FRINT:
   case ISD::FNEARBYINT:
+  case ISD::FP_EXTEND:
   case ISD::FP_TO_SINT:
   case ISD::FP_TO_UINT:
   case ISD::SINT_TO_FP:
@@ -2005,6 +2006,7 @@ bool DAGTypeLegalizer::WidenVectorOperand(SDNode *N, unsigned ResNo) {
   case ISD::STORE:              Res = WidenVecOp_STORE(N); break;
 
   case ISD::FP_ROUND:
+  case ISD::FP_EXTEND:
   case ISD::FP_TO_SINT:
   case ISD::FP_TO_UINT:
   case ISD::SINT_TO_FP:
diff --git a/test/CodeGen/Generic/2011-02-27-Fpextend.ll b/test/CodeGen/Generic/2011-02-27-Fpextend.ll
new file mode 100644 (file)
index 0000000..38a1e4e
--- /dev/null
@@ -0,0 +1,7 @@
+; RUN: llc < %s
+; PR9309
+
+define <4 x double> @f_fu(<4 x float>) nounwind {
+  %float2double.i = fpext <4 x float> %0 to <4 x double>
+  ret <4 x double> %float2double.i
+}