@@ -490,7 +490,7 @@ void expand_vec_lceil (rtx, rtx, machine_mode, machine_mode);
void expand_vec_lfloor (rtx, rtx, machine_mode, machine_mode);
#endif
bool sew64_scalar_helper (rtx *, rtx *, rtx, machine_mode,
- bool, void (*)(rtx *, rtx));
+ bool, void (*)(rtx *, rtx), enum avl_type);
rtx gen_scalar_move_mask (machine_mode);
rtx gen_no_side_effects_vsetvl_rtx (machine_mode, rtx, rtx);
@@ -1641,7 +1641,7 @@ has_vi_variant_p (rtx_code code, rtx x)
bool
sew64_scalar_helper (rtx *operands, rtx *scalar_op, rtx vl,
machine_mode vector_mode, bool has_vi_variant_p,
- void (*emit_vector_func) (rtx *, rtx))
+ void (*emit_vector_func) (rtx *, rtx), enum avl_type type)
{
machine_mode scalar_mode = GET_MODE_INNER (vector_mode);
if (has_vi_variant_p)
@@ -1671,7 +1671,11 @@ sew64_scalar_helper (rtx *operands, rtx *scalar_op, rtx vl,
rtx tmp = gen_reg_rtx (vector_mode);
rtx ops[] = {tmp, *scalar_op};
- emit_nonvlmax_insn (code_for_pred_broadcast (vector_mode), UNARY_OP, ops, vl);
+ if (type == VLMAX)
+ emit_vlmax_insn (code_for_pred_broadcast (vector_mode), UNARY_OP, ops);
+ else
+ emit_nonvlmax_insn (code_for_pred_broadcast (vector_mode), UNARY_OP, ops,
+ vl);
emit_vector_func (operands, tmp);
return true;
@@ -1779,7 +1779,8 @@
emit_insn (gen_pred_merge<mode> (operands[0], operands[1],
operands[2], boardcast_scalar, operands[4], operands[5],
operands[6], operands[7]));
- }))
+ },
+ (riscv_vector::avl_type) INTVAL (operands[7])))
DONE;
})
@@ -2537,7 +2538,8 @@
emit_insn (gen_pred_<optab><mode> (operands[0], operands[1],
operands[2], operands[3], boardcast_scalar, operands[5],
operands[6], operands[7], operands[8]));
- }))
+ },
+ (riscv_vector::avl_type) INTVAL (operands[8])))
DONE;
})
@@ -2612,7 +2614,8 @@
emit_insn (gen_pred_<optab><mode> (operands[0], operands[1],
operands[2], operands[3], boardcast_scalar, operands[5],
operands[6], operands[7], operands[8]));
- }))
+ },
+ (riscv_vector::avl_type) INTVAL (operands[8])))
DONE;
})
@@ -2687,7 +2690,8 @@
emit_insn (gen_pred_sub<mode> (operands[0], operands[1],
operands[2], boardcast_scalar, operands[3], operands[5],
operands[6], operands[7], operands[8]));
- }))
+ },
+ (riscv_vector::avl_type) INTVAL (operands[8])))
DONE;
})
@@ -2804,7 +2808,8 @@
emit_insn (gen_pred_mulh<v_su><mode> (operands[0], operands[1],
operands[2], operands[3], boardcast_scalar, operands[5],
operands[6], operands[7], operands[8]));
- }))
+ },
+ (riscv_vector::avl_type) INTVAL (operands[8])))
DONE;
})
@@ -2978,7 +2983,8 @@
emit_insn (gen_pred_adc<mode> (operands[0], operands[1],
operands[2], boardcast_scalar, operands[4], operands[5],
operands[6], operands[7]));
- }))
+ },
+ (riscv_vector::avl_type) INTVAL (operands[7])))
DONE;
})
@@ -3061,7 +3067,8 @@
emit_insn (gen_pred_sbc<mode> (operands[0], operands[1],
operands[2], boardcast_scalar, operands[4], operands[5],
operands[6], operands[7]));
- }))
+ },
+ (riscv_vector::avl_type) INTVAL (operands[7])))
DONE;
})
@@ -3218,7 +3225,8 @@
[] (rtx *operands, rtx boardcast_scalar) {
emit_insn (gen_pred_madc<mode> (operands[0], operands[1],
boardcast_scalar, operands[3], operands[4], operands[5]));
- }))
+ },
+ (riscv_vector::avl_type) INTVAL (operands[5])))
DONE;
})
@@ -3287,7 +3295,8 @@
[] (rtx *operands, rtx boardcast_scalar) {
emit_insn (gen_pred_msbc<mode> (operands[0], operands[1],
boardcast_scalar, operands[3], operands[4], operands[5]));
- }))
+ },
+ (riscv_vector::avl_type) INTVAL (operands[5])))
DONE;
})
@@ -3429,7 +3438,8 @@
[] (rtx *operands, rtx boardcast_scalar) {
emit_insn (gen_pred_madc<mode>_overflow (operands[0], operands[1],
boardcast_scalar, operands[3], operands[4]));
- }))
+ },
+ (riscv_vector::avl_type) INTVAL (operands[4])))
DONE;
})
@@ -3495,7 +3505,8 @@
[] (rtx *operands, rtx boardcast_scalar) {
emit_insn (gen_pred_msbc<mode>_overflow (operands[0], operands[1],
boardcast_scalar, operands[3], operands[4]));
- }))
+ },
+ (riscv_vector::avl_type) INTVAL (operands[4])))
DONE;
})
@@ -4006,7 +4017,8 @@
emit_insn (gen_pred_<optab><mode> (operands[0], operands[1],
operands[2], operands[3], boardcast_scalar, operands[5],
operands[6], operands[7], operands[8]));
- }))
+ },
+ (riscv_vector::avl_type) INTVAL (operands[8])))
DONE;
})
@@ -4081,7 +4093,8 @@
emit_insn (gen_pred_<optab><mode> (operands[0], operands[1],
operands[2], operands[3], boardcast_scalar, operands[5],
operands[6], operands[7], operands[8]));
- }))
+ },
+ (riscv_vector::avl_type) INTVAL (operands[8])))
DONE;
})
@@ -4226,7 +4239,8 @@
emit_insn (gen_pred_<sat_op><mode> (operands[0], operands[1],
operands[2], operands[3], boardcast_scalar, operands[5],
operands[6], operands[7], operands[8], operands[9]));
- }))
+ },
+ (riscv_vector::avl_type) INTVAL (operands[8])))
DONE;
})
@@ -4692,7 +4706,8 @@
emit_insn (gen_pred_cmp<mode> (operands[0], operands[1],
operands[2], operands[3], operands[4], boardcast_scalar,
operands[6], operands[7], operands[8]));
- }))
+ },
+ (riscv_vector::avl_type) INTVAL (operands[8])))
DONE;
})
@@ -4724,7 +4739,8 @@
emit_insn (gen_pred_cmp<mode> (operands[0], operands[1],
operands[2], operands[3], operands[4], boardcast_scalar,
operands[6], operands[7], operands[8]));
- }))
+ },
+ (riscv_vector::avl_type) INTVAL (operands[8])))
DONE;
})
@@ -5347,7 +5363,8 @@
emit_insn (gen_pred_mul_plus<mode> (operands[0], operands[1],
boardcast_scalar, operands[3], operands[4], operands[5],
operands[6], operands[7], operands[8], operands[9]));
- }))
+ },
+ (riscv_vector::avl_type) INTVAL (operands[9])))
DONE;
})
@@ -5644,7 +5661,8 @@
emit_insn (gen_pred_minus_mul<mode> (operands[0], operands[1],
boardcast_scalar, operands[3], operands[4], operands[5],
operands[6], operands[7], operands[8], operands[9]));
- }))
+ },
+ (riscv_vector::avl_type) INTVAL (operands[9])))
DONE;
})