diff --git a/gcc/config/riscv/autovec-opt.md b/gcc/config/riscv/autovec-opt.md index 35476c8c446..c86fb16586d 100644 --- a/gcc/config/riscv/autovec-opt.md +++ b/gcc/config/riscv/autovec-opt.md @@ -2244,6 +2244,34 @@ [(set_attr "type" "vfminmax")] ) +(define_insn_and_split "*literal_v_vf_" + [(set (match_operand:V_VLSF 0 "register_operand") + (if_then_else:V_VLSF + (unspec: + [(match_operand: 1 "vector_mask_operand") + (match_operand 5 "vector_length_operand") + (match_operand 6 "const_int_operand") + (match_operand 7 "const_int_operand") + (match_operand 8 "const_int_operand") + (reg:SI VL_REGNUM) + (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE) + (unspec:V_VLSF + [(vec_duplicate:V_VLSF + (match_operand: 3 "register_operand")) + (match_operand:V_VLSF 4 "register_operand")] UNSPEC_VFMAXMIN) + (unspec:V_VLSF + [(match_operand:DI 2 "register_operand")] UNSPEC_VUNDEF)))] + "TARGET_VECTOR && can_create_pseudo_p ()" + "#" + "&& 1" + [(const_int 0)] + { + rtx ops[] = {operands[0], operands[4], operands[3]}; + insn_code icode = code_for_pred_scalar (, mode); + riscv_vector::emit_vlmax_insn (icode, riscv_vector::BINARY_OP, ops); + } + [(set_attr "type" "vfminmax")]) + (define_insn_and_split "*v_vf_" [(set (match_operand:V_VLSF 0 "register_operand") (unspec:V_VLSF [