@@ -7034,7 +7034,8 @@ defm : VPatBinaryV_VM_XM_IM<"int_riscv_vmerge", "PseudoVMERGE">;
7034
7034
// 11.16. Vector Integer Move Instructions
7035
7035
//===----------------------------------------------------------------------===//
7036
7036
foreach vti = AllVectors in {
7037
- let Predicates = GetVTypePredicates<vti>.Predicates in {
7037
+ let Predicates = !if(!eq(vti.Scalar, f16), [HasVInstructionsF16Minimal],
7038
+ GetVTypePredicates<vti>.Predicates) in {
7038
7039
def : Pat<(vti.Vector (int_riscv_vmv_v_v (vti.Vector vti.RegClass:$passthru),
7039
7040
(vti.Vector vti.RegClass:$rs1),
7040
7041
VLOpFrag)),
@@ -7229,19 +7230,20 @@ defm : VPatConversionVI_VF<"int_riscv_vfclass", "PseudoVFCLASS">;
7229
7230
// NOTE: Clang previously used int_riscv_vfmerge for vector-vector, but now uses
7230
7231
// int_riscv_vmerge. Support both for compatibility.
7231
7232
foreach vti = AllFloatVectors in {
7232
- let Predicates = GetVTypePredicates<vti>.Predicates in {
7233
+ let Predicates = !if(!eq(vti.Scalar, f16), [HasVInstructionsF16Minimal],
7234
+ GetVTypePredicates<vti>.Predicates) in
7233
7235
defm : VPatBinaryCarryInTAIL<"int_riscv_vmerge", "PseudoVMERGE", "VVM",
7234
7236
vti.Vector,
7235
7237
vti.Vector, vti.Vector, vti.Mask,
7236
7238
vti.Log2SEW, vti.LMul, vti.RegClass,
7237
7239
vti.RegClass, vti.RegClass>;
7240
+ let Predicates = GetVTypePredicates<vti>.Predicates in
7238
7241
defm : VPatBinaryCarryInTAIL<"int_riscv_vfmerge", "PseudoVFMERGE",
7239
7242
"V"#vti.ScalarSuffix#"M",
7240
7243
vti.Vector,
7241
7244
vti.Vector, vti.Scalar, vti.Mask,
7242
7245
vti.Log2SEW, vti.LMul, vti.RegClass,
7243
7246
vti.RegClass, vti.ScalarRegClass>;
7244
- }
7245
7247
}
7246
7248
7247
7249
foreach fvti = AllFloatVectors in {
0 commit comments