diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp index 3250133a6732..d63862d63872 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp @@ -222,6 +222,7 @@ SDValue VectorLegalizer::LegalizeOp(SDValue Op) { case ISD::FNEARBYINT: case ISD::FFLOOR: case ISD::FP_ROUND: + case ISD::FP_EXTEND: case ISD::FMA: case ISD::SIGN_EXTEND_INREG: QueryType = Node->getValueType(0); diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp index e123f1563eff..bd470eb4bb72 100644 --- a/llvm/lib/Target/ARM/ARMISelLowering.cpp +++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp @@ -544,6 +544,7 @@ ARMTargetLowering::ARMTargetLowering(TargetMachine &TM) setOperationAction(ISD::FP_TO_SINT, MVT::v4i16, Custom); setOperationAction(ISD::FP_ROUND, MVT::v2f32, Expand); + setOperationAction(ISD::FP_EXTEND, MVT::v2f64, Expand); setTargetDAGCombine(ISD::INTRINSIC_VOID); setTargetDAGCombine(ISD::INTRINSIC_W_CHAIN); diff --git a/llvm/test/CodeGen/ARM/neon_fpconv.ll b/llvm/test/CodeGen/ARM/neon_fpconv.ll index f80ea3e34953..1948ad847111 100644 --- a/llvm/test/CodeGen/ARM/neon_fpconv.ll +++ b/llvm/test/CodeGen/ARM/neon_fpconv.ll @@ -7,3 +7,11 @@ define <2 x float> @vtrunc(<2 x double> %a) { %vt = fptrunc <2 x double> %a to <2 x float> ret <2 x float> %vt } + +define <2 x double> @vextend(<2 x float> %a) { +; CHECK: vcvt.f64.f32 [[D0:d[0-9]+]], [[S0:s[0-9]+]] +; CHECK: vcvt.f64.f32 [[D1:d[0-9]+]], [[S1:s[0-9]+]] + %ve = fpext <2 x float> %a to <2 x double> + ret <2 x double> %ve +} +