Hi!

On Mon, Jun 20, 2022 at 11:12:50AM +0800, HAO CHEN GUI wrote:
> --- a/gcc/config/rs6000/rs6000-builtins.def
> +++ b/gcc/config/rs6000/rs6000-builtins.def

You don't have this in the changelog.  Please fix.

> --- a/gcc/config/rs6000/rs6000.md
> +++ b/gcc/config/rs6000/rs6000.md

This, too.  And match.pd isn't in the patch.

> +(define_insn "f<minmax_op><mode>3"
> +  [(set (match_operand:SFDF 0 "vsx_register_operand" "=wa")
> +     (unspec:SFDF [(match_operand:SFDF 1 "vsx_register_operand" "wa")
> +                   (match_operand:SFDF 2 "vsx_register_operand" "wa")]
> +                  FMINMAX))]
> +  "TARGET_VSX && !flag_finite_math_only"

&& !flag_trapping_math

and/or whatever else is needed as well here.

> +  "xs<minmax_op>dp %x0,%x1,%x2"
> +  [(set_attr "type" "fp")]
> +)

Are things like
  fmin(4.0, 2.0);
(still) optimised correctly?

> new file mode 100644
> index 00000000000..e43ac40c2d1
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/powerpc/pr103605.c
> +/* { dg-options "-O1 -mvsx" } */

Please use -O2 instead.  That way, it will catch it if any of the
optimisations that are normally done (and not with just -O1) sabotage
us here.

Thanks,


Segher

Reply via email to