On Mon, May 17, 2021 at 3:18 PM Joern Wolfgang Rennecke
<joern.renne...@riscy-ip.com> wrote:
>
> Attached is the updated version of the patch.
> Bootstrapped and regtested on x86_64-pc-linux-gnu.
>
> OK to apply?

+       machine_mode m = mode_for_size ((prec + 1) / 2, MODE_INT, 1).require ();
+       int half_prec = GET_MODE_PRECISION (as_a <scalar_int_mode> (m));
+       if (m != TYPE_MODE (type))

so I'd rather see it as

      opt_machine_mode m = mode_for_size ((prec + 1) / 2, MODE_INT, 1);
      int half_prec = 8;
      if (m.exists ()
          && m.require () != TYPE_MODE (type))
       {
          half_prec = GET_MODE_PRECISION (as_a <scalar_int_mode> (m));
          half_type = build_nonstandard_integer_type (half_prec, 1);
       }

to avoid .require () on a possibly non-existent mode.  Maybe there's a more
clever way to formulate the mode comparison.  CCed Richard for this.

OK with such a change.

Thanks,
Richard.

Reply via email to