https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112450
--- Comment #2 from JuzheZhong <juzhe.zhong at rivai dot ai> --- if (loop_vinfo && LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo) && mask_out_inactive) { if (cond_len_fn != IFN_LAST && direct_internal_fn_supported_p (cond_len_fn, vectype, OPTIMIZE_FOR_SPEED)) vect_record_loop_len (loop_vinfo, lens, ncopies * vec_num, vectype, 1); else if (cond_fn != IFN_LAST && direct_internal_fn_supported_p (cond_fn, vectype, OPTIMIZE_FOR_SPEED)) vect_record_loop_mask (loop_vinfo, masks, ncopies * vec_num, vectype, NULL); else { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, "can't use a fully-masked loop because no" " conditional operation is available.\n"); LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo) = false; } } go through second condition with vect_record_loop_mask here. Seems that we can't differentiate RVV VLS mode with cond_xxx. RVV VLS mode just want to support COND_XXX to support for (int i < N) cond[i]? a[i] + b[i] : c[i] N is known iterations.