public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/94193] New: powerpc: Provide fegetround/feraiseexcept/feclearexcept builtins
@ 2020-03-16 15:19 adhemerval.zanella at linaro dot org
  2022-01-24 17:00 ` [Bug target/94193] " cvs-commit at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2020-03-16 15:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94193

            Bug ID: 94193
           Summary: powerpc: Provide
                    fegetround/feraiseexcept/feclearexcept builtins
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: adhemerval.zanella at linaro dot org
  Target Milestone: ---

For hard-float powerpc, GCC should support inline code generation for the 
fegetround, feraiseexcept, and feclearexcept. These optimization has been
provided by glibc through fenvinline and glibc idea is to remove both the
headers and the header optimizations [1].

[1] https://sourceware.org/pipermail/libc-alpha/2020-March/111752.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/94193] powerpc: Provide fegetround/feraiseexcept/feclearexcept builtins
  2020-03-16 15:19 [Bug target/94193] New: powerpc: Provide fegetround/feraiseexcept/feclearexcept builtins adhemerval.zanella at linaro dot org
@ 2022-01-24 17:00 ` cvs-commit at gcc dot gnu.org
  2022-01-26 15:21 ` cvs-commit at gcc dot gnu.org
  2022-01-27 12:46 ` segher at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-24 17:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94193

--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Segher Boessenkool <segher@gcc.gnu.org>:

https://gcc.gnu.org/g:4343f5e256791a5abaaef29fe1f831a03bab129e

commit r12-6848-g4343f5e256791a5abaaef29fe1f831a03bab129e
Author: Raoni Fassina Firmino <raoni@linux.ibm.com>
Date:   Thu Jan 13 14:08:53 2022 -0300

    rtl: builtins: (not just) rs6000: Add builtins for fegetround,
feclearexcept and feraiseexcept [PR94193]

    This optimizations were originally in glibc, but was removed
    and suggested that they were a good fit as gcc builtins[1].

    feclearexcept and feraiseexcept were extended (in comparison to the
    glibc version) to accept any combination of the accepted flags, not
    limited to just one flag bit at a time anymore.

    The builtin expanders needs knowledge of the target libc's FE_*
    values, so they are limited to expand only to suitable libcs.

    [1] https://sourceware.org/legacy-ml/libc-alpha/2020-03/msg00047.html
        https://sourceware.org/legacy-ml/libc-alpha/2020-03/msg00080.html

    2020-08-13  Raoni Fassina Firmino  <raoni@linux.ibm.com>

    gcc/
            PR target/94193
            * builtins.cc (expand_builtin_fegetround): New function.
            (expand_builtin_feclear_feraise_except): New function.
            (expand_builtin): Add cases for BUILT_IN_FEGETROUND,
            BUILT_IN_FECLEAREXCEPT and BUILT_IN_FERAISEEXCEPT.
            * config/rs6000/rs6000.md (fegetroundsi): New pattern.
            (feclearexceptsi): New Pattern.
            (feraiseexceptsi): New Pattern.
            * doc/extend.texi: Add a new introductory paragraph about the
            new builtins.
            * doc/md.texi: (fegetround@var{m}): Document new optab.
            (feclearexcept@var{m}): Document new optab.
            (feraiseexcept@var{m}): Document new optab.
            * optabs.def (fegetround_optab): New optab.
            (feclearexcept_optab): New optab.
            (feraiseexcept_optab): New optab.

    gcc/testsuite/
            PR target/94193
            * gcc.target/powerpc/builtin-feclearexcept-feraiseexcept-1.c: New
test.
            * gcc.target/powerpc/builtin-feclearexcept-feraiseexcept-2.c: New
test.
            * gcc.target/powerpc/builtin-fegetround.c: New test.

    Signed-off-by: Raoni Fassina Firmino <raoni@linux.ibm.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/94193] powerpc: Provide fegetround/feraiseexcept/feclearexcept builtins
  2020-03-16 15:19 [Bug target/94193] New: powerpc: Provide fegetround/feraiseexcept/feclearexcept builtins adhemerval.zanella at linaro dot org
  2022-01-24 17:00 ` [Bug target/94193] " cvs-commit at gcc dot gnu.org
@ 2022-01-26 15:21 ` cvs-commit at gcc dot gnu.org
  2022-01-27 12:46 ` segher at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-26 15:21 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94193

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Segher Boessenkool <segher@gcc.gnu.org>:

https://gcc.gnu.org/g:8bcf835e0a4e3334e1c60f314ae6917ba648bdde

commit r12-6877-g8bcf835e0a4e3334e1c60f314ae6917ba648bdde
Author: Raoni Fassina Firmino <raoni@linux.ibm.com>
Date:   Wed Jan 26 12:05:54 2022 -0300

    rtl: builtins: Fix builtins feclearexcept and feraiseexcept operand check
[PR94193]

    Commit 4343f5e25679 ("rtl: builtins: (not just) rs6000: Add builtins
    for fegetround, feclearexcept and feraiseexcept [PR94193]") broke gcc
    bootstra when building with --enable-checking=rtl[1].

    The function expand_builtin_feclear_feraise_except was failing to
    proper validate op0 predicate before emit_insn leading to the mismatch
    type failure.

    [1] https://gcc.gnu.org/pipermail/gcc-patches/2022-January/589186.html

    2022-01-26  Raoni Fassina Firmino  <raoni@linux.ibm.com>

    gcc/
            PR target/94193
            * builtins.cc (expand_builtin_feclear_feraise_except): Add op0
            predicate check.

    Signed-off-by: Raoni Fassina Firmino <raoni@linux.ibm.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/94193] powerpc: Provide fegetround/feraiseexcept/feclearexcept builtins
  2020-03-16 15:19 [Bug target/94193] New: powerpc: Provide fegetround/feraiseexcept/feclearexcept builtins adhemerval.zanella at linaro dot org
  2022-01-24 17:00 ` [Bug target/94193] " cvs-commit at gcc dot gnu.org
  2022-01-26 15:21 ` cvs-commit at gcc dot gnu.org
@ 2022-01-27 12:46 ` segher at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: segher at gcc dot gnu.org @ 2022-01-27 12:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94193

Segher Boessenkool <segher at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED
                 CC|                            |segher at gcc dot gnu.org

--- Comment #3 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Raoni says this is fixed now.  Thanks!

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-01-27 12:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-16 15:19 [Bug target/94193] New: powerpc: Provide fegetround/feraiseexcept/feclearexcept builtins adhemerval.zanella at linaro dot org
2022-01-24 17:00 ` [Bug target/94193] " cvs-commit at gcc dot gnu.org
2022-01-26 15:21 ` cvs-commit at gcc dot gnu.org
2022-01-27 12:46 ` segher at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).