Message ID | 20231228172026.2013007-3-adhemerval.zanella@linaro.org |
---|---|
State | New |
Headers | show |
Series | Improve rounding to interger function for C23 | expand |
On Thu, Dec 28, 2023 at 9:21 AM Adhemerval Zanella <adhemerval.zanella@linaro.org> wrote: > > The ifunc variants now uses the powerpc implementation which in turn > uses the compiler builtin. Without the proper -mcpu switch the builtin > does not generate the expected optimization. > > Checked on powerpc-linux-gnu. > --- > sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile > index 64317506c6..2f5c0eded6 100644 > --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile > +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile > @@ -34,6 +34,12 @@ CFLAGS-s_modff-power5+.c = -mcpu=power5+ > CFLAGS-s_logbl-power7.c = -mcpu=power7 > CFLAGS-s_logb-power7.c = -mcpu=power7 > CFLAGS-s_logbf-power7.c = -mcpu=power7 > +CFLAGS-s_round-power5+.c += -mcpu=power5+ > +CFLAGS-s_roundf-power5+.c += -mcpu=power5+ > +CFLAGS-s_floor-power5+.c += -mcpu=power5+ > +CFLAGS-s_floorf-power5+.c += -mcpu=power5+ > +CFLAGS-s_trunc-power5+.c += -mcpu=power5+ > +CFLAGS-s_truncf-power5+.c += -mcpu=power5+ > > # These files quiet sNaNs in a way that is optimized away without > # -fsignaling-nans. > -- > 2.34.1 > LGTM. Reviewed-by: H.J. Lu <hjl.tools@gmail.com> Thanks.
On 4/1/24 8:59 AM, H.J. Lu wrote: > On Thu, Dec 28, 2023 at 9:21 AM Adhemerval Zanella > <adhemerval.zanella@linaro.org> wrote: >> >> The ifunc variants now uses the powerpc implementation which in turn >> uses the compiler builtin. Without the proper -mcpu switch the builtin >> does not generate the expected optimization. >> >> Checked on powerpc-linux-gnu. >> --- >> sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile | 6 ++++++ >> 1 file changed, 6 insertions(+) >> >> diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile >> index 64317506c6..2f5c0eded6 100644 >> --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile >> +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile >> @@ -34,6 +34,12 @@ CFLAGS-s_modff-power5+.c = -mcpu=power5+ >> CFLAGS-s_logbl-power7.c = -mcpu=power7 >> CFLAGS-s_logb-power7.c = -mcpu=power7 >> CFLAGS-s_logbf-power7.c = -mcpu=power7 >> +CFLAGS-s_round-power5+.c += -mcpu=power5+ >> +CFLAGS-s_roundf-power5+.c += -mcpu=power5+ >> +CFLAGS-s_floor-power5+.c += -mcpu=power5+ >> +CFLAGS-s_floorf-power5+.c += -mcpu=power5+ >> +CFLAGS-s_trunc-power5+.c += -mcpu=power5+ >> +CFLAGS-s_truncf-power5+.c += -mcpu=power5+ >> >> # These files quiet sNaNs in a way that is optimized away without >> # -fsignaling-nans. >> -- >> 2.34.1 >> > > LGTM. > > Reviewed-by: H.J. Lu <hjl.tools@gmail.com> This predated me taking over the Power port, but... LGTM too. Reviewed-by: Peter Bergner <bergner@linux.ibm.com> Peter
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile index 64317506c6..2f5c0eded6 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile @@ -34,6 +34,12 @@ CFLAGS-s_modff-power5+.c = -mcpu=power5+ CFLAGS-s_logbl-power7.c = -mcpu=power7 CFLAGS-s_logb-power7.c = -mcpu=power7 CFLAGS-s_logbf-power7.c = -mcpu=power7 +CFLAGS-s_round-power5+.c += -mcpu=power5+ +CFLAGS-s_roundf-power5+.c += -mcpu=power5+ +CFLAGS-s_floor-power5+.c += -mcpu=power5+ +CFLAGS-s_floorf-power5+.c += -mcpu=power5+ +CFLAGS-s_trunc-power5+.c += -mcpu=power5+ +CFLAGS-s_truncf-power5+.c += -mcpu=power5+ # These files quiet sNaNs in a way that is optimized away without # -fsignaling-nans.