diff --git a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp --- a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp +++ b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp @@ -1886,14 +1886,21 @@ m_Value()))) VecPred = CurrentPred; } - // Check if we have a compare/select chain that can be lowered using CMxx & - // BFI pair. - if (CmpInst::isIntPredicate(VecPred)) { - static const auto ValidMinMaxTys = {MVT::v8i8, MVT::v16i8, MVT::v4i16, - MVT::v8i16, MVT::v2i32, MVT::v4i32, - MVT::v2i64}; + // Check if we have a compare/select chain that can be lowered using + // a (F)CMxx & BFI pair. + if (CmpInst::isIntPredicate(VecPred) || VecPred == CmpInst::FCMP_OLE || + VecPred == CmpInst::FCMP_OLT || VecPred == CmpInst::FCMP_OGT || + VecPred == CmpInst::FCMP_OGE || VecPred == CmpInst::FCMP_OEQ || + VecPred == CmpInst::FCMP_UNE) { + static const auto ValidMinMaxTys = { + MVT::v8i8, MVT::v16i8, MVT::v4i16, MVT::v8i16, MVT::v2i32, + MVT::v4i32, MVT::v2i64, MVT::v2f32, MVT::v4f32, MVT::v2f64}; + static const auto ValidFP16MinMaxTys = {MVT::v4f16, MVT::v8f16}; + auto LT = TLI->getTypeLegalizationCost(DL, ValTy); - if (any_of(ValidMinMaxTys, [<](MVT M) { return M == LT.second; })) + if (any_of(ValidMinMaxTys, [<](MVT M) { return M == LT.second; }) || + (ST->hasFullFP16() && + any_of(ValidFP16MinMaxTys, [<](MVT M) { return M == LT.second; }))) return LT.first; } diff --git a/llvm/test/Analysis/CostModel/AArch64/vector-select.ll b/llvm/test/Analysis/CostModel/AArch64/vector-select.ll --- a/llvm/test/Analysis/CostModel/AArch64/vector-select.ll +++ b/llvm/test/Analysis/CostModel/AArch64/vector-select.ll @@ -158,7 +158,7 @@ ; COST-NOFP16-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %cmp.1 = fcmp ogt <4 x half> %a, %b ; COST-NOFP16-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c ; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp.1 = fcmp ogt <4 x half> %a, %b -; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c +; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c ; ; CODE-LABEL: v4f16_select_ogt ; CODE: bb.0 @@ -176,7 +176,7 @@ ; COST-NOFP16-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %cmp.1 = fcmp ogt <8 x half> %a, %b ; COST-NOFP16-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c ; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp.1 = fcmp ogt <8 x half> %a, %b -; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c +; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c ; ; CODE-LABEL: v8f16_select_ogt ; CODE: bb.0 @@ -192,7 +192,7 @@ define <2 x float> @v2f32_select_ogt(<2 x float> %a, <2 x float> %b, <2 x float> %c) { ; COST-LABEL: v2f32_select_ogt ; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp.1 = fcmp ogt <2 x float> %a, %b -; COST-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %s.1 = select <2 x i1> %cmp.1, <2 x float> %a, <2 x float> %c +; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s.1 = select <2 x i1> %cmp.1, <2 x float> %a, <2 x float> %c ; ; CODE-LABEL: v2f32_select_ogt ; CODE: bb.0 @@ -208,7 +208,7 @@ define <4 x float> @v4f32_select_ogt(<4 x float> %a, <4 x float> %b, <4 x float> %c) { ; COST-LABEL: v4f32_select_ogt ; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp.1 = fcmp ogt <4 x float> %a, %b -; COST-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %s.1 = select <4 x i1> %cmp.1, <4 x float> %a, <4 x float> %c +; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s.1 = select <4 x i1> %cmp.1, <4 x float> %a, <4 x float> %c ; ; CODE-LABEL: v4f32_select_ogt ; CODE: bb.0 @@ -224,7 +224,7 @@ define <2 x double> @v2f64_select_ogt(<2 x double> %a, <2 x double> %b, <2 x double> %c) { ; COST-LABEL: v2f64_select_ogt ; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp.1 = fcmp ogt <2 x double> %a, %b -; COST-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %s.1 = select <2 x i1> %cmp.1, <2 x double> %a, <2 x double> %c +; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s.1 = select <2 x i1> %cmp.1, <2 x double> %a, <2 x double> %c ; ; CODE-LABEL: v2f64_select_ogt ; CODE: bb.0 @@ -242,7 +242,7 @@ ; COST-NOFP16-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %cmp.1 = fcmp oge <4 x half> %a, %b ; COST-NOFP16-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c ; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp.1 = fcmp oge <4 x half> %a, %b -; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c +; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c ; ; CODE-LABEL: v4f16_select_oge ; CODE: bb.0 @@ -260,7 +260,7 @@ ; COST-NOFP16-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %cmp.1 = fcmp oge <8 x half> %a, %b ; COST-NOFP16-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c ; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp.1 = fcmp oge <8 x half> %a, %b -; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c +; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c ; ; CODE-LABEL: v8f16_select_oge ; CODE: bb.0 @@ -276,7 +276,7 @@ define <2 x float> @v2f32_select_oge(<2 x float> %a, <2 x float> %b, <2 x float> %c) { ; COST-LABEL: v2f32_select_oge ; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp.1 = fcmp oge <2 x float> %a, %b -; COST-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %s.1 = select <2 x i1> %cmp.1, <2 x float> %a, <2 x float> %c +; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s.1 = select <2 x i1> %cmp.1, <2 x float> %a, <2 x float> %c ; ; CODE-LABEL: v2f32_select_oge ; CODE: bb.0 @@ -292,7 +292,7 @@ define <4 x float> @v4f32_select_oge(<4 x float> %a, <4 x float> %b, <4 x float> %c) { ; COST-LABEL: v4f32_select_oge ; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp.1 = fcmp oge <4 x float> %a, %b -; COST-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %s.1 = select <4 x i1> %cmp.1, <4 x float> %a, <4 x float> %c +; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s.1 = select <4 x i1> %cmp.1, <4 x float> %a, <4 x float> %c ; ; CODE-LABEL: v4f32_select_oge ; CODE: bb.0 @@ -308,7 +308,7 @@ define <2 x double> @v2f64_select_oge(<2 x double> %a, <2 x double> %b, <2 x double> %c) { ; COST-LABEL: v2f64_select_oge ; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp.1 = fcmp oge <2 x double> %a, %b -; COST-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %s.1 = select <2 x i1> %cmp.1, <2 x double> %a, <2 x double> %c +; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s.1 = select <2 x i1> %cmp.1, <2 x double> %a, <2 x double> %c ; ; CODE-LABEL: v2f64_select_oge ; CODE: bb.0 @@ -326,7 +326,7 @@ ; COST-NOFP16-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %cmp.1 = fcmp olt <4 x half> %a, %b ; COST-NOFP16-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c ; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp.1 = fcmp olt <4 x half> %a, %b -; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c +; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c ; ; CODE-LABEL: v4f16_select_olt ; CODE: bb.0 @@ -344,7 +344,7 @@ ; COST-NOFP16-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %cmp.1 = fcmp olt <8 x half> %a, %b ; COST-NOFP16-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c ; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp.1 = fcmp olt <8 x half> %a, %b -; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c +; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c ; ; CODE-LABEL: v8f16_select_olt ; CODE: bb.0 @@ -360,7 +360,7 @@ define <2 x float> @v2f32_select_olt(<2 x float> %a, <2 x float> %b, <2 x float> %c) { ; COST-LABEL: v2f32_select_olt ; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp.1 = fcmp olt <2 x float> %a, %b -; COST-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %s.1 = select <2 x i1> %cmp.1, <2 x float> %a, <2 x float> %c +; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s.1 = select <2 x i1> %cmp.1, <2 x float> %a, <2 x float> %c ; ; CODE-LABEL: v2f32_select_olt ; CODE: bb.0 @@ -376,7 +376,7 @@ define <4 x float> @v4f32_select_olt(<4 x float> %a, <4 x float> %b, <4 x float> %c) { ; COST-LABEL: v4f32_select_olt ; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp.1 = fcmp olt <4 x float> %a, %b -; COST-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %s.1 = select <4 x i1> %cmp.1, <4 x float> %a, <4 x float> %c +; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s.1 = select <4 x i1> %cmp.1, <4 x float> %a, <4 x float> %c ; ; CODE-LABEL: v4f32_select_olt ; CODE: bb.0 @@ -392,7 +392,7 @@ define <2 x double> @v2f64_select_olt(<2 x double> %a, <2 x double> %b, <2 x double> %c) { ; COST-LABEL: v2f64_select_olt ; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp.1 = fcmp olt <2 x double> %a, %b -; COST-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %s.1 = select <2 x i1> %cmp.1, <2 x double> %a, <2 x double> %c +; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s.1 = select <2 x i1> %cmp.1, <2 x double> %a, <2 x double> %c ; ; CODE-LABEL: v2f64_select_olt ; CODE: bb.0 @@ -410,7 +410,7 @@ ; COST-NOFP16-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %cmp.1 = fcmp ole <4 x half> %a, %b ; COST-NOFP16-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c ; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp.1 = fcmp ole <4 x half> %a, %b -; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c +; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c ; ; CODE-LABEL: v4f16_select_ole ; CODE: bb.0 @@ -428,7 +428,7 @@ ; COST-NOFP16-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %cmp.1 = fcmp ole <8 x half> %a, %b ; COST-NOFP16-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c ; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp.1 = fcmp ole <8 x half> %a, %b -; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c +; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c ; ; CODE-LABEL: v8f16_select_ole ; CODE: bb.0 @@ -444,7 +444,7 @@ define <2 x float> @v2f32_select_ole(<2 x float> %a, <2 x float> %b, <2 x float> %c) { ; COST-LABEL: v2f32_select_ole ; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp.1 = fcmp ole <2 x float> %a, %b -; COST-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %s.1 = select <2 x i1> %cmp.1, <2 x float> %a, <2 x float> %c +; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s.1 = select <2 x i1> %cmp.1, <2 x float> %a, <2 x float> %c ; ; CODE-LABEL: v2f32_select_ole ; CODE: bb.0 @@ -460,7 +460,7 @@ define <4 x float> @v4f32_select_ole(<4 x float> %a, <4 x float> %b, <4 x float> %c) { ; COST-LABEL: v4f32_select_ole ; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp.1 = fcmp ole <4 x float> %a, %b -; COST-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %s.1 = select <4 x i1> %cmp.1, <4 x float> %a, <4 x float> %c +; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s.1 = select <4 x i1> %cmp.1, <4 x float> %a, <4 x float> %c ; ; CODE-LABEL: v4f32_select_ole ; CODE: bb.0 @@ -476,7 +476,7 @@ define <2 x double> @v2f64_select_ole(<2 x double> %a, <2 x double> %b, <2 x double> %c) { ; COST-LABEL: v2f64_select_ole ; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp.1 = fcmp ole <2 x double> %a, %b -; COST-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %s.1 = select <2 x i1> %cmp.1, <2 x double> %a, <2 x double> %c +; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s.1 = select <2 x i1> %cmp.1, <2 x double> %a, <2 x double> %c ; ; CODE-LABEL: v2f64_select_ole ; CODE: bb.0 @@ -494,7 +494,7 @@ ; COST-NOFP16-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %cmp.1 = fcmp oeq <4 x half> %a, %b ; COST-NOFP16-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c ; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp.1 = fcmp oeq <4 x half> %a, %b -; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c +; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c ; ; CODE-LABEL: v4f16_select_oeq ; CODE: bb.0 @@ -512,7 +512,7 @@ ; COST-NOFP16-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %cmp.1 = fcmp oeq <8 x half> %a, %b ; COST-NOFP16-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c ; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp.1 = fcmp oeq <8 x half> %a, %b -; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c +; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c ; ; CODE-LABEL: v8f16_select_oeq ; CODE: bb.0 @@ -528,7 +528,7 @@ define <2 x float> @v2f32_select_oeq(<2 x float> %a, <2 x float> %b, <2 x float> %c) { ; COST-LABEL: v2f32_select_oeq ; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp.1 = fcmp oeq <2 x float> %a, %b -; COST-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %s.1 = select <2 x i1> %cmp.1, <2 x float> %a, <2 x float> %c +; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s.1 = select <2 x i1> %cmp.1, <2 x float> %a, <2 x float> %c ; ; CODE-LABEL: v2f32_select_oeq ; CODE: bb.0 @@ -544,7 +544,7 @@ define <4 x float> @v4f32_select_oeq(<4 x float> %a, <4 x float> %b, <4 x float> %c) { ; COST-LABEL: v4f32_select_oeq ; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp.1 = fcmp oeq <4 x float> %a, %b -; COST-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %s.1 = select <4 x i1> %cmp.1, <4 x float> %a, <4 x float> %c +; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s.1 = select <4 x i1> %cmp.1, <4 x float> %a, <4 x float> %c ; ; CODE-LABEL: v4f32_select_oeq ; CODE: bb.0 @@ -560,7 +560,7 @@ define <2 x double> @v2f64_select_oeq(<2 x double> %a, <2 x double> %b, <2 x double> %c) { ; COST-LABEL: v2f64_select_oeq ; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp.1 = fcmp oeq <2 x double> %a, %b -; COST-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %s.1 = select <2 x i1> %cmp.1, <2 x double> %a, <2 x double> %c +; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s.1 = select <2 x i1> %cmp.1, <2 x double> %a, <2 x double> %c ; ; CODE-LABEL: v2f64_select_oeq ; CODE: bb.0 @@ -672,7 +672,7 @@ ; COST-NOFP16-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %cmp.1 = fcmp une <4 x half> %a, %b ; COST-NOFP16-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c ; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp.1 = fcmp une <4 x half> %a, %b -; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c +; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s.1 = select <4 x i1> %cmp.1, <4 x half> %a, <4 x half> %c ; ; CODE-LABEL: v4f16_select_une ; CODE: bb.0 @@ -690,7 +690,7 @@ ; COST-NOFP16-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %cmp.1 = fcmp une <8 x half> %a, %b ; COST-NOFP16-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c ; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp.1 = fcmp une <8 x half> %a, %b -; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c +; COST-FULLFP16-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c ; ; CODE-LABEL: v8f16_select_une ; CODE: bb.0 @@ -706,7 +706,7 @@ define <2 x float> @v2f32_select_une(<2 x float> %a, <2 x float> %b, <2 x float> %c) { ; COST-LABEL: v2f32_select_une ; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp.1 = fcmp une <2 x float> %a, %b -; COST-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %s.1 = select <2 x i1> %cmp.1, <2 x float> %a, <2 x float> %c +; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s.1 = select <2 x i1> %cmp.1, <2 x float> %a, <2 x float> %c ; ; CODE-LABEL: v2f32_select_une ; CODE: bb.0 @@ -722,7 +722,7 @@ define <4 x float> @v4f32_select_une(<4 x float> %a, <4 x float> %b, <4 x float> %c) { ; COST-LABEL: v4f32_select_une ; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp.1 = fcmp une <4 x float> %a, %b -; COST-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %s.1 = select <4 x i1> %cmp.1, <4 x float> %a, <4 x float> %c +; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s.1 = select <4 x i1> %cmp.1, <4 x float> %a, <4 x float> %c ; ; CODE-LABEL: v4f32_select_une ; CODE: bb.0 @@ -738,7 +738,7 @@ define <2 x double> @v2f64_select_une(<2 x double> %a, <2 x double> %b, <2 x double> %c) { ; COST-LABEL: v2f64_select_une ; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp.1 = fcmp une <2 x double> %a, %b -; COST-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %s.1 = select <2 x i1> %cmp.1, <2 x double> %a, <2 x double> %c +; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s.1 = select <2 x i1> %cmp.1, <2 x double> %a, <2 x double> %c ; ; CODE-LABEL: v2f64_select_une ; CODE: bb.0