Hi Shi-Hua: > --- a/gcc/config/riscv/riscv.c > +++ b/gcc/config/riscv/riscv.c > @@ -1872,7 +1872,7 @@ riscv_rtx_costs (rtx x, machine_mode mode, int > outer_code, int opno ATTRIBUTE_UN > case MULT: > if (float_mode_p) > *total = tune_param->fp_mul[mode == DFmode]; > - else if (!TARGET_MUL) > + else if (!TARGET_MUL && !TARGET_ZMMUL) > /* Estimate the cost of a library call. */ > *total = COSTS_N_INSNS (speed ? 32 : 6); > else if (GET_MODE_SIZE (mode) > UNITS_PER_WORD) > @@ -4736,6 +4736,9 @@ riscv_option_override (void) > if (flag_pic) > g_switch_value = 0; > > + /* zmmul */ > + if (TARGET_ZMMUL && TARGET_MUL) > + error ("can not use both the %<ZMMUL%> and the %<M%> extension");
My understanding is zmmul and M are not mutually exclusive, so we don't need this check, Otherwise it is LGTM, but I'm just surprised it's still 0.1 and not frozen yet. [1] https://github.com/riscv/riscv-isa-manual/pull/648#issuecomment-842461775