[RISCV] Add Zvfhmin extension support for llvm RISCV backend
This patch supports Zvfhmin for RISCV codegen. Reviewed By: michaelmaitland Differential Revision: https://reviews.llvm.org/D151414
This commit is contained in:
parent
4d4ed5b215
commit
759903568f
@ -143,6 +143,7 @@ static const RISCVSupportedExtension SupportedExtensions[] = {
|
||||
{"zve64x", RISCVExtensionVersion{1, 0}},
|
||||
|
||||
{"zvfh", RISCVExtensionVersion{1, 0}},
|
||||
{"zvfhmin", RISCVExtensionVersion{1, 0}},
|
||||
|
||||
{"zvl1024b", RISCVExtensionVersion{1, 0}},
|
||||
{"zvl128b", RISCVExtensionVersion{1, 0}},
|
||||
@ -985,6 +986,7 @@ static const char *ImpliedExtsZve64x[] = {"zve32x", "zvl64b"};
|
||||
static const char *ImpliedExtsZvfbfmin[] = {"zve32f", "zfbfmin"};
|
||||
static const char *ImpliedExtsZvfbfwma[] = {"zvfbfmin"};
|
||||
static const char *ImpliedExtsZvfh[] = {"zve32f", "zfhmin"};
|
||||
static const char *ImpliedExtsZvfhmin[] = {"zve32f"};
|
||||
static const char *ImpliedExtsZvkn[] = {"zvkb", "zvkned", "zvknhb", "zvkt"};
|
||||
static const char *ImpliedExtsZvknc[] = {"zvbc", "zvkn"};
|
||||
static const char *ImpliedExtsZvkng[] = {"zvkg", "zvkn"};
|
||||
@ -1051,6 +1053,7 @@ static constexpr ImpliedExtsEntry ImpliedExts[] = {
|
||||
{{"zvfbfmin"}, {ImpliedExtsZvfbfmin}},
|
||||
{{"zvfbfwma"}, {ImpliedExtsZvfbfwma}},
|
||||
{{"zvfh"}, {ImpliedExtsZvfh}},
|
||||
{{"zvfhmin"}, {ImpliedExtsZvfhmin}},
|
||||
{{"zvkn"}, {ImpliedExtsZvkn}},
|
||||
{{"zvknc"}, {ImpliedExtsZvknc}},
|
||||
{{"zvkng"}, {ImpliedExtsZvkng}},
|
||||
|
||||
@ -492,8 +492,18 @@ def FeatureStdExtZvfh
|
||||
"'Zvfh' (Vector Half-Precision Floating-Point)",
|
||||
[FeatureStdExtZve32f, FeatureStdExtZfhmin]>;
|
||||
|
||||
def FeatureStdExtZvfhmin
|
||||
: SubtargetFeature<"zvfhmin", "HasStdExtZvfhmin", "true",
|
||||
"'Zvfhmin' (Vector Half-Precision Floating-Point Minimal)",
|
||||
[FeatureStdExtZve32f]>;
|
||||
|
||||
def HasVInstructionsF16 : Predicate<"Subtarget->hasVInstructionsF16()">;
|
||||
|
||||
def HasVInstructionsF16Minimal : Predicate<"Subtarget->hasVInstructionsF16Minimal()">,
|
||||
AssemblerPredicate<(any_of FeatureStdExtZvfhmin, FeatureStdExtZvfh),
|
||||
"'Zvfhmin' (Vector Half-Precision Floating-Point Minimal) or "
|
||||
"'Zvfh' (Vector Half-Precision Floating-Point)">;
|
||||
|
||||
def HasStdExtZfhOrZvfh
|
||||
: Predicate<"Subtarget->hasStdExtZfh() || Subtarget->hasStdExtZvfh()">,
|
||||
AssemblerPredicate<(any_of FeatureStdExtZfh, FeatureStdExtZvfh),
|
||||
|
||||
@ -186,7 +186,7 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
|
||||
addRegClassForRVV(VT);
|
||||
}
|
||||
|
||||
if (Subtarget.hasVInstructionsF16())
|
||||
if (Subtarget.hasVInstructionsF16Minimal())
|
||||
for (MVT VT : F16VecVTs)
|
||||
addRegClassForRVV(VT);
|
||||
|
||||
@ -910,6 +910,14 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
|
||||
continue;
|
||||
SetCommonVFPActions(VT);
|
||||
}
|
||||
} else if (Subtarget.hasVInstructionsF16Minimal()) {
|
||||
for (MVT VT : F16VecVTs) {
|
||||
if (!isTypeLegal(VT))
|
||||
continue;
|
||||
setOperationAction({ISD::FP_ROUND, ISD::FP_EXTEND}, VT, Custom);
|
||||
setOperationAction({ISD::VP_FP_ROUND, ISD::VP_FP_EXTEND}, VT, Custom);
|
||||
// TODO: make others promote?
|
||||
}
|
||||
}
|
||||
|
||||
if (Subtarget.hasVInstructionsF32()) {
|
||||
@ -1093,6 +1101,14 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
|
||||
// expansion to a build_vector of 0s.
|
||||
setOperationAction(ISD::UNDEF, VT, Custom);
|
||||
|
||||
if (VT.getVectorElementType() == MVT::f16 &&
|
||||
!Subtarget.hasVInstructionsF16()) {
|
||||
setOperationAction({ISD::FP_ROUND, ISD::FP_EXTEND}, VT, Custom);
|
||||
setOperationAction({ISD::VP_FP_ROUND, ISD::VP_FP_EXTEND}, VT, Custom);
|
||||
// TODO: make others promote?
|
||||
continue;
|
||||
}
|
||||
|
||||
// We use EXTRACT_SUBVECTOR as a "cast" from scalable to fixed.
|
||||
setOperationAction({ISD::INSERT_SUBVECTOR, ISD::EXTRACT_SUBVECTOR}, VT,
|
||||
Custom);
|
||||
@ -2260,7 +2276,7 @@ static bool useRVVForFixedLengthVectorVT(MVT VT,
|
||||
return false;
|
||||
break;
|
||||
case MVT::f16:
|
||||
if (!Subtarget.hasVInstructionsF16())
|
||||
if (!Subtarget.hasVInstructionsF16Minimal())
|
||||
return false;
|
||||
break;
|
||||
case MVT::f32:
|
||||
@ -12338,10 +12354,18 @@ static SDValue combineVFMADD_VLWithVFNEG_VL(SDNode *N, SelectionDAG &DAG) {
|
||||
VL);
|
||||
}
|
||||
|
||||
static SDValue performVFMADD_VLCombine(SDNode *N, SelectionDAG &DAG) {
|
||||
static SDValue performVFMADD_VLCombine(SDNode *N, SelectionDAG &DAG,
|
||||
const RISCVSubtarget &Subtarget) {
|
||||
if (SDValue V = combineVFMADD_VLWithVFNEG_VL(N, DAG))
|
||||
return V;
|
||||
|
||||
if (N->getValueType(0).isScalableVector() &&
|
||||
N->getValueType(0).getVectorElementType() == MVT::f32 &&
|
||||
(Subtarget.hasVInstructionsF16Minimal() &&
|
||||
!Subtarget.hasVInstructionsF16())) {
|
||||
return SDValue();
|
||||
}
|
||||
|
||||
// FIXME: Ignore strict opcodes for now.
|
||||
if (N->isTargetStrictFPOpcode())
|
||||
return SDValue();
|
||||
@ -12392,7 +12416,15 @@ static SDValue performVFMADD_VLCombine(SDNode *N, SelectionDAG &DAG) {
|
||||
N->getOperand(2), Mask, VL);
|
||||
}
|
||||
|
||||
static SDValue performVFMUL_VLCombine(SDNode *N, SelectionDAG &DAG) {
|
||||
static SDValue performVFMUL_VLCombine(SDNode *N, SelectionDAG &DAG,
|
||||
const RISCVSubtarget &Subtarget) {
|
||||
if (N->getValueType(0).isScalableVector() &&
|
||||
N->getValueType(0).getVectorElementType() == MVT::f32 &&
|
||||
(Subtarget.hasVInstructionsF16Minimal() &&
|
||||
!Subtarget.hasVInstructionsF16())) {
|
||||
return SDValue();
|
||||
}
|
||||
|
||||
// FIXME: Ignore strict opcodes for now.
|
||||
assert(!N->isTargetStrictFPOpcode() && "Unexpected opcode");
|
||||
|
||||
@ -12425,7 +12457,15 @@ static SDValue performVFMUL_VLCombine(SDNode *N, SelectionDAG &DAG) {
|
||||
Op1, Merge, Mask, VL);
|
||||
}
|
||||
|
||||
static SDValue performFADDSUB_VLCombine(SDNode *N, SelectionDAG &DAG) {
|
||||
static SDValue performFADDSUB_VLCombine(SDNode *N, SelectionDAG &DAG,
|
||||
const RISCVSubtarget &Subtarget) {
|
||||
if (N->getValueType(0).isScalableVector() &&
|
||||
N->getValueType(0).getVectorElementType() == MVT::f32 &&
|
||||
(Subtarget.hasVInstructionsF16Minimal() &&
|
||||
!Subtarget.hasVInstructionsF16())) {
|
||||
return SDValue();
|
||||
}
|
||||
|
||||
SDValue Op0 = N->getOperand(0);
|
||||
SDValue Op1 = N->getOperand(1);
|
||||
SDValue Merge = N->getOperand(2);
|
||||
@ -13561,12 +13601,12 @@ SDValue RISCVTargetLowering::PerformDAGCombine(SDNode *N,
|
||||
case RISCVISD::STRICT_VFNMADD_VL:
|
||||
case RISCVISD::STRICT_VFMSUB_VL:
|
||||
case RISCVISD::STRICT_VFNMSUB_VL:
|
||||
return performVFMADD_VLCombine(N, DAG);
|
||||
return performVFMADD_VLCombine(N, DAG, Subtarget);
|
||||
case RISCVISD::FMUL_VL:
|
||||
return performVFMUL_VLCombine(N, DAG);
|
||||
return performVFMUL_VLCombine(N, DAG, Subtarget);
|
||||
case RISCVISD::FADD_VL:
|
||||
case RISCVISD::FSUB_VL:
|
||||
return performFADDSUB_VLCombine(N, DAG);
|
||||
return performFADDSUB_VLCombine(N, DAG, Subtarget);
|
||||
case ISD::LOAD:
|
||||
case ISD::STORE: {
|
||||
if (DCI.isAfterLegalizeDAG())
|
||||
|
||||
@ -5870,11 +5870,13 @@ multiclass VPatConversionWF_VF<string intrinsic, string instruction> {
|
||||
foreach fvtiToFWti = AllWidenableFloatVectors in {
|
||||
defvar fvti = fvtiToFWti.Vti;
|
||||
defvar fwti = fvtiToFWti.Wti;
|
||||
let Predicates = !listconcat(GetVTypePredicates<fvti>.Predicates,
|
||||
GetVTypePredicates<fwti>.Predicates) in
|
||||
defm : VPatConversionTA<intrinsic, instruction, "V",
|
||||
fwti.Vector, fvti.Vector, fwti.Mask, fvti.Log2SEW,
|
||||
fvti.LMul, fwti.RegClass, fvti.RegClass>;
|
||||
// Define vfwcvt.f.f.v for f16 when Zvfhmin is enable.
|
||||
let Predicates = !if(!eq(fvti.Scalar, f16), [HasVInstructionsF16Minimal],
|
||||
!listconcat(GetVTypePredicates<fvti>.Predicates,
|
||||
GetVTypePredicates<fwti>.Predicates)) in
|
||||
defm : VPatConversionTA<intrinsic, instruction, "V",
|
||||
fwti.Vector, fvti.Vector, fwti.Mask, fvti.Log2SEW,
|
||||
fvti.LMul, fwti.RegClass, fvti.RegClass>;
|
||||
}
|
||||
}
|
||||
|
||||
@ -5939,8 +5941,9 @@ multiclass VPatConversionVF_WF <string intrinsic, string instruction> {
|
||||
}
|
||||
}
|
||||
|
||||
multiclass VPatConversionVF_WF_RM <string intrinsic, string instruction> {
|
||||
foreach fvtiToFWti = AllWidenableFloatVectors in {
|
||||
multiclass VPatConversionVF_WF_RM <string intrinsic, string instruction,
|
||||
list<VTypeInfoToWide> wlist = AllWidenableFloatVectors> {
|
||||
foreach fvtiToFWti = wlist in {
|
||||
defvar fvti = fvtiToFWti.Vti;
|
||||
defvar fwti = fvtiToFWti.Wti;
|
||||
let Predicates = !listconcat(GetVTypePredicates<fvti>.Predicates,
|
||||
@ -7196,8 +7199,17 @@ defm : VPatConversionVI_WF<"int_riscv_vfncvt_rtz_xu_f_w", "PseudoVFNCVT_RTZ_XU_F
|
||||
defm : VPatConversionVI_WF<"int_riscv_vfncvt_rtz_x_f_w", "PseudoVFNCVT_RTZ_X_F">;
|
||||
defm : VPatConversionVF_WI_RM <"int_riscv_vfncvt_f_xu_w", "PseudoVFNCVT_F_XU">;
|
||||
defm : VPatConversionVF_WI_RM <"int_riscv_vfncvt_f_x_w", "PseudoVFNCVT_F_X">;
|
||||
defm : VPatConversionVF_WF_RM<"int_riscv_vfncvt_f_f_w", "PseudoVFNCVT_F_F">;
|
||||
defm : VPatConversionVF_WF_BF_RM<"int_riscv_vfncvtbf16_f_f_w",
|
||||
defvar WidenableFloatVectorsExceptF16 = !filter(fvtiToFWti, AllWidenableFloatVectors,
|
||||
!ne(fvtiToFWti.Vti.Scalar, f16));
|
||||
defm : VPatConversionVF_WF_RM<"int_riscv_vfncvt_f_f_w", "PseudoVFNCVT_F_F",
|
||||
WidenableFloatVectorsExceptF16>;
|
||||
// Define vfncvt.f.f.w for f16 when Zvfhmin is enable.
|
||||
defvar F16WidenableFloatVectors = !filter(fvtiToFWti, AllWidenableFloatVectors,
|
||||
!eq(fvtiToFWti.Vti.Scalar, f16));
|
||||
let Predicates = [HasVInstructionsF16Minimal] in
|
||||
defm : VPatConversionVF_WF_RM<"int_riscv_vfncvt_f_f_w", "PseudoVFNCVT_F_F",
|
||||
F16WidenableFloatVectors>;
|
||||
defm : VPatConversionVF_WF_BF_RM<"int_riscv_vfncvtbf16_f_f_w",
|
||||
"PseudoVFNCVTBF16_F_F">;
|
||||
defm : VPatConversionVF_WF<"int_riscv_vfncvt_rod_f_f_w", "PseudoVFNCVT_ROD_F_F">;
|
||||
|
||||
|
||||
@ -1401,8 +1401,9 @@ defm : VPatNConvertI2FPSDNode_W_RM<any_uint_to_fp, "PseudoVFNCVT_F_XU_W">;
|
||||
foreach fvtiToFWti = AllWidenableFloatVectors in {
|
||||
defvar fvti = fvtiToFWti.Vti;
|
||||
defvar fwti = fvtiToFWti.Wti;
|
||||
let Predicates = !listconcat(GetVTypePredicates<fvti>.Predicates,
|
||||
GetVTypePredicates<fwti>.Predicates) in
|
||||
let Predicates = !if(!eq(fvti.Scalar, f16), [HasVInstructionsF16Minimal],
|
||||
!listconcat(GetVTypePredicates<fvti>.Predicates,
|
||||
GetVTypePredicates<fwti>.Predicates)) in
|
||||
def : Pat<(fvti.Vector (fpround (fwti.Vector fwti.RegClass:$rs1))),
|
||||
(!cast<Instruction>("PseudoVFNCVT_F_F_W_"#fvti.LMul.MX)
|
||||
(fvti.Vector (IMPLICIT_DEF)),
|
||||
|
||||
@ -2589,8 +2589,9 @@ defm : VPatWConvertI2FPVL_V<any_riscv_sint_to_fp_vl, "PseudoVFWCVT_F_X_V">;
|
||||
foreach fvtiToFWti = AllWidenableFloatVectors in {
|
||||
defvar fvti = fvtiToFWti.Vti;
|
||||
defvar fwti = fvtiToFWti.Wti;
|
||||
let Predicates = !listconcat(GetVTypePredicates<fvti>.Predicates,
|
||||
GetVTypePredicates<fwti>.Predicates) in
|
||||
let Predicates = !if(!eq(fvti.Scalar, f16), [HasVInstructionsF16Minimal],
|
||||
!listconcat(GetVTypePredicates<fvti>.Predicates,
|
||||
GetVTypePredicates<fwti>.Predicates)) in
|
||||
def : Pat<(fwti.Vector (any_riscv_fpextend_vl
|
||||
(fvti.Vector fvti.RegClass:$rs1),
|
||||
(fvti.Mask V0),
|
||||
@ -2619,8 +2620,10 @@ defm : VPatNConvertI2FP_RM_VL_W<riscv_vfcvt_rm_f_x_vl, "PseudoVFNCVT_RM_F_X_W">;
|
||||
foreach fvtiToFWti = AllWidenableFloatVectors in {
|
||||
defvar fvti = fvtiToFWti.Vti;
|
||||
defvar fwti = fvtiToFWti.Wti;
|
||||
let Predicates = !listconcat(GetVTypePredicates<fvti>.Predicates,
|
||||
GetVTypePredicates<fwti>.Predicates) in {
|
||||
// Define vfwcvt.f.f.v for f16 when Zvfhmin is enable.
|
||||
let Predicates = !if(!eq(fvti.Scalar, f16), [HasVInstructionsF16Minimal],
|
||||
!listconcat(GetVTypePredicates<fvti>.Predicates,
|
||||
GetVTypePredicates<fwti>.Predicates)) in {
|
||||
def : Pat<(fvti.Vector (any_riscv_fpround_vl
|
||||
(fwti.Vector fwti.RegClass:$rs1),
|
||||
(fwti.Mask V0), VLOpFrag)),
|
||||
@ -2632,6 +2635,8 @@ foreach fvtiToFWti = AllWidenableFloatVectors in {
|
||||
FRM_DYN,
|
||||
GPR:$vl, fvti.Log2SEW, TA_MA)>;
|
||||
|
||||
let Predicates = !listconcat(GetVTypePredicates<fvti>.Predicates,
|
||||
GetVTypePredicates<fwti>.Predicates) in
|
||||
def : Pat<(fvti.Vector (any_riscv_fncvt_rod_vl
|
||||
(fwti.Vector fwti.RegClass:$rs1),
|
||||
(fwti.Mask V0), VLOpFrag)),
|
||||
|
||||
@ -166,6 +166,9 @@ public:
|
||||
// Vector codegen related methods.
|
||||
bool hasVInstructions() const { return HasStdExtZve32x; }
|
||||
bool hasVInstructionsI64() const { return HasStdExtZve64x; }
|
||||
bool hasVInstructionsF16Minimal() const {
|
||||
return HasStdExtZvfhmin || HasStdExtZvfh;
|
||||
}
|
||||
bool hasVInstructionsF16() const { return HasStdExtZvfh; }
|
||||
bool hasVInstructionsBF16() const { return HasStdExtZvfbfmin; }
|
||||
bool hasVInstructionsF32() const { return HasStdExtZve32f; }
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||
; RUN: llc -mtriple=riscv32 -mattr=+d,+zfh,+zvfh,+v -riscv-v-vector-bits-min=128 -verify-machineinstrs < %s | FileCheck %s
|
||||
; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+zvfh,+v -riscv-v-vector-bits-min=128 -verify-machineinstrs < %s | FileCheck %s
|
||||
; RUN: llc -mtriple=riscv32 -mattr=+d,+zfh,+zvfhmin,+v -riscv-v-vector-bits-min=128 -verify-machineinstrs < %s | FileCheck %s
|
||||
; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+zvfhmin,+v -riscv-v-vector-bits-min=128 -verify-machineinstrs < %s | FileCheck %s
|
||||
|
||||
declare <2 x float> @llvm.vp.fpext.v2f32.v2f16(<2 x half>, <2 x i1>, i32)
|
||||
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||
; RUN: llc -mtriple=riscv32 -mattr=+d,+zfh,+zvfh,+v -riscv-v-vector-bits-min=128 -verify-machineinstrs < %s | FileCheck %s
|
||||
; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+zvfh,+v -riscv-v-vector-bits-min=128 -verify-machineinstrs < %s | FileCheck %s
|
||||
; RUN: llc -mtriple=riscv32 -mattr=+d,+zfh,+zvfhmin,+v -riscv-v-vector-bits-min=128 -verify-machineinstrs < %s | FileCheck %s
|
||||
; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+zvfhmin,+v -riscv-v-vector-bits-min=128 -verify-machineinstrs < %s | FileCheck %s
|
||||
|
||||
|
||||
declare <2 x half> @llvm.vp.fptrunc.v2f16.v2f32(<2 x float>, <2 x i1>, i32)
|
||||
|
||||
|
||||
@ -7,6 +7,12 @@
|
||||
; RUN: -verify-machineinstrs -target-abi=ilp32d | FileCheck %s
|
||||
; RUN: sed 's/iXLen/i64/g' %s | llc -mtriple=riscv64 -mattr=+v,+zfhmin,+zvfh \
|
||||
; RUN: -verify-machineinstrs -target-abi=lp64d | FileCheck %s
|
||||
; RUN: sed 's/iXLen/i32/g' %s | not --crash llc -mtriple=riscv32 -mattr=+v,+zfh,+zvfhmin \
|
||||
; RUN: -target-abi=ilp32d 2>&1 | FileCheck %s --check-prefixes=ZVFMIN
|
||||
; RUN: sed 's/iXLen/i64/g' %s | not --crash llc -mtriple=riscv64 -mattr=+v,+zfh,+zvfhmin \
|
||||
; RUN: -target-abi=lp64d 2>&1 | FileCheck %s --check-prefixes=ZVFMIN
|
||||
|
||||
; ZVFMIN: LLVM ERROR: Cannot select: intrinsic %llvm.riscv.vfadd
|
||||
|
||||
declare <vscale x 1 x half> @llvm.riscv.vfadd.nxv1f16.nxv1f16(
|
||||
<vscale x 1 x half>,
|
||||
|
||||
@ -3,7 +3,10 @@
|
||||
; RUN: -verify-machineinstrs -target-abi=ilp32d | FileCheck %s
|
||||
; RUN: sed 's/iXLen/i64/g' %s | llc -mtriple=riscv64 -mattr=+v,+zfh,+zvfh \
|
||||
; RUN: -verify-machineinstrs -target-abi=lp64d | FileCheck %s
|
||||
|
||||
; RUN: sed 's/iXLen/i32/g' %s | llc -mtriple=riscv32 -mattr=+v,+zfh,+zvfhmin \
|
||||
; RUN: -verify-machineinstrs -target-abi=ilp32d | FileCheck %s
|
||||
; RUN: sed 's/iXLen/i64/g' %s | llc -mtriple=riscv64 -mattr=+v,+zfh,+zvfhmin \
|
||||
; RUN: -verify-machineinstrs -target-abi=lp64d | FileCheck %s
|
||||
declare <vscale x 1 x half> @llvm.riscv.vfncvt.f.f.w.nxv1f16.nxv1f32(
|
||||
<vscale x 1 x half>,
|
||||
<vscale x 1 x float>,
|
||||
|
||||
@ -3,6 +3,10 @@
|
||||
; RUN: -verify-machineinstrs < %s | FileCheck %s
|
||||
; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+zvfh,+v -target-abi=lp64d \
|
||||
; RUN: -verify-machineinstrs < %s | FileCheck %s
|
||||
; RUN: llc -mtriple=riscv32 -mattr=+d,+zfh,+zvfhmin,+v -target-abi=ilp32d \
|
||||
; RUN: -verify-machineinstrs < %s | FileCheck %s
|
||||
; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+zvfhmin,+v -target-abi=lp64d \
|
||||
; RUN: -verify-machineinstrs < %s | FileCheck %s
|
||||
|
||||
define <vscale x 1 x float> @vfpext_nxv1f16_nxv1f32(<vscale x 1 x half> %va) {
|
||||
;
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||
; RUN: llc -mtriple=riscv32 -mattr=+d,+zfh,+zvfh,+v -verify-machineinstrs < %s | FileCheck %s
|
||||
; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+zvfh,+v -verify-machineinstrs < %s | FileCheck %s
|
||||
; RUN: llc -mtriple=riscv32 -mattr=+d,+zfh,+zvfhmin,+v -verify-machineinstrs < %s | FileCheck %s
|
||||
; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+zvfhmin,+v -verify-machineinstrs < %s | FileCheck %s
|
||||
|
||||
declare <vscale x 2 x float> @llvm.vp.fpext.nxv2f32.nxv2f16(<vscale x 2 x half>, <vscale x 2 x i1>, i32)
|
||||
|
||||
|
||||
@ -3,6 +3,10 @@
|
||||
; RUN: -verify-machineinstrs < %s | FileCheck %s
|
||||
; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+zvfh,+v -target-abi=lp64d \
|
||||
; RUN: -verify-machineinstrs < %s | FileCheck %s
|
||||
; RUN: llc -mtriple=riscv32 -mattr=+d,+zfh,+zvfhmin,+v -target-abi=ilp32d \
|
||||
; RUN: -verify-machineinstrs < %s | FileCheck %s
|
||||
; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+zvfhmin,+v -target-abi=lp64d \
|
||||
; RUN: -verify-machineinstrs < %s | FileCheck %s
|
||||
|
||||
define <vscale x 1 x half> @vfptrunc_nxv1f32_nxv1f16(<vscale x 1 x float> %va) {
|
||||
;
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||
; RUN: llc -mtriple=riscv32 -mattr=+d,+zfh,+zvfh,+v,+m -verify-machineinstrs < %s | FileCheck %s
|
||||
; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+zvfh,+v,+m -verify-machineinstrs < %s | FileCheck %s
|
||||
; RUN: llc -mtriple=riscv32 -mattr=+d,+zfh,+zvfhmin,+v,+m -verify-machineinstrs < %s | FileCheck %s
|
||||
; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+zvfhmin,+v,+m -verify-machineinstrs < %s | FileCheck %s
|
||||
|
||||
declare <vscale x 2 x half> @llvm.vp.fptrunc.nxv2f16.nxv2f32(<vscale x 2 x float>, <vscale x 2 x i1>, i32)
|
||||
|
||||
|
||||
@ -3,7 +3,10 @@
|
||||
; RUN: -verify-machineinstrs -target-abi=ilp32d | FileCheck %s
|
||||
; RUN: sed 's/iXLen/i64/g' %s | llc -mtriple=riscv64 -mattr=+v,+zfh,+zvfh \
|
||||
; RUN: -verify-machineinstrs -target-abi=lp64d | FileCheck %s
|
||||
|
||||
; RUN: sed 's/iXLen/i32/g' %s | llc -mtriple=riscv32 -mattr=+v,+zfh,+zvfhmin \
|
||||
; RUN: -verify-machineinstrs -target-abi=ilp32d | FileCheck %s
|
||||
; RUN: sed 's/iXLen/i64/g' %s | llc -mtriple=riscv64 -mattr=+v,+zfh,+zvfhmin \
|
||||
; RUN: -verify-machineinstrs -target-abi=lp64d | FileCheck %s
|
||||
declare <vscale x 1 x float> @llvm.riscv.vfwcvt.f.f.v.nxv1f32.nxv1f16(
|
||||
<vscale x 1 x float>,
|
||||
<vscale x 1 x half>,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user