public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/114981] New: [avr] Improve powi implementation
@ 2024-05-08  6:33 gjl at gcc dot gnu.org
  2024-05-08  6:34 ` [Bug target/114981] " gjl at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: gjl at gcc dot gnu.org @ 2024-05-08  6:33 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114981
           Summary: [avr] Improve powi implementation
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gjl at gcc dot gnu.org
  Target Milestone: ---

powif() and powi() can be improved in functionality

* __powisf2 is in open coded C, which bloats due to PR11093 or PR114243 or
similar register allocation flaws.

* __powidf2 is not implemented.

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

* [Bug target/114981] [avr] Improve powi implementation
  2024-05-08  6:33 [Bug target/114981] New: [avr] Improve powi implementation gjl at gcc dot gnu.org
@ 2024-05-08  6:34 ` gjl at gcc dot gnu.org
  2024-05-08 17:04 ` cvs-commit at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: gjl at gcc dot gnu.org @ 2024-05-08  6:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
(In reply to Georg-Johann Lay from comment #0)
> ... due to PR11093 ...

PR110093

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

* [Bug target/114981] [avr] Improve powi implementation
  2024-05-08  6:33 [Bug target/114981] New: [avr] Improve powi implementation gjl at gcc dot gnu.org
  2024-05-08  6:34 ` [Bug target/114981] " gjl at gcc dot gnu.org
@ 2024-05-08 17:04 ` cvs-commit at gcc dot gnu.org
  2024-05-09  8:10 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-05-08 17:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Georg-Johann Lay <gjl@gcc.gnu.org>:

https://gcc.gnu.org/g:de4eea7d7ea86e54843507c68d6672eca9d8c7bb

commit r15-331-gde4eea7d7ea86e54843507c68d6672eca9d8c7bb
Author: Georg-Johann Lay <avr@gjlay.de>
Date:   Wed May 8 17:56:05 2024 +0200

    AVR: target/114981 - Support __builtin_powi[l] / __powidf2.

    This supports __powidf2 by means of a double wrapper for already
    existing f7_powi (renamed to __f7_powi by f7-renames.h).
    It tweaks the implementation so that it does not perform trivial
    multiplications with 1.0 any more, but instead uses a move.
    It also fixes the last statement of f7_powi, which was wrong.
    Notice that f7_powi was unused until now.

            PR target/114981
    libgcc/config/avr/libf7/
            * libf7-common.mk (F7_ASM_PARTS): Add D_powi
            * libf7-asm.sx (F7MOD_D_powi_, __powidf2): New module and function.
            * libf7.c (f7_powi): Fix last (wrong) statement.
            Tweak trivial multiplications with 1.0.

    gcc/testsuite/
            * gcc.target/avr/pr114981-powil.c: New test.

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

* [Bug target/114981] [avr] Improve powi implementation
  2024-05-08  6:33 [Bug target/114981] New: [avr] Improve powi implementation gjl at gcc dot gnu.org
  2024-05-08  6:34 ` [Bug target/114981] " gjl at gcc dot gnu.org
  2024-05-08 17:04 ` cvs-commit at gcc dot gnu.org
@ 2024-05-09  8:10 ` cvs-commit at gcc dot gnu.org
  2024-05-09  8:31 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-05-09  8:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Georg-Johann Lay
<gjl@gcc.gnu.org>:

https://gcc.gnu.org/g:adba85bb63a45d7d668501c11bdf9772cc00b7b8

commit r13-8736-gadba85bb63a45d7d668501c11bdf9772cc00b7b8
Author: Georg-Johann Lay <avr@gjlay.de>
Date:   Wed May 8 17:56:05 2024 +0200

    AVR: target/114981 - Support __builtin_powi[l] / __powidf2.

    This supports __powidf2 by means of a double wrapper for already
    existing f7_powi (renamed to __f7_powi by f7-renames.h).
    It tweaks the implementation so that it does not perform trivial
    multiplications with 1.0 any more, but instead uses a move.
    It also fixes the last statement of f7_powi, which was wrong.
    Notice that f7_powi was unused until now.

            PR target/114981
    libgcc/config/avr/libf7/
            * libf7-common.mk (F7_ASM_PARTS): Add D_powi
            * libf7-asm.sx (F7MOD_D_powi_, __powidf2): New module and function.
            * libf7.c (f7_powi): Fix last (wrong) statement.
            Tweak trivial multiplications with 1.0.

    gcc/testsuite/
            * gcc.target/avr/pr114981-powil.c: New test.

    (cherry picked from commit de4eea7d7ea86e54843507c68d6672eca9d8c7bb)

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

* [Bug target/114981] [avr] Improve powi implementation
  2024-05-08  6:33 [Bug target/114981] New: [avr] Improve powi implementation gjl at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-05-09  8:10 ` cvs-commit at gcc dot gnu.org
@ 2024-05-09  8:31 ` cvs-commit at gcc dot gnu.org
  2024-05-10  9:59 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-05-09  8:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Georg-Johann Lay
<gjl@gcc.gnu.org>:

https://gcc.gnu.org/g:a9e313ed38775b3ffee650d5396419ce3e6ea389

commit r14-10186-ga9e313ed38775b3ffee650d5396419ce3e6ea389
Author: Georg-Johann Lay <avr@gjlay.de>
Date:   Wed May 8 17:56:05 2024 +0200

    AVR: target/114981 - Support __builtin_powi[l] / __powidf2.

    This supports __powidf2 by means of a double wrapper for already
    existing f7_powi (renamed to __f7_powi by f7-renames.h).
    It tweaks the implementation so that it does not perform trivial
    multiplications with 1.0 any more, but instead uses a move.
    It also fixes the last statement of f7_powi, which was wrong.
    Notice that f7_powi was unused until now.

            PR target/114981
    libgcc/config/avr/libf7/
            * libf7-common.mk (F7_ASM_PARTS): Add D_powi
            * libf7-asm.sx (F7MOD_D_powi_, __powidf2): New module and function.
            * libf7.c (f7_powi): Fix last (wrong) statement.
            Tweak trivial multiplications with 1.0.

    gcc/testsuite/
            * gcc.target/avr/pr114981-powil.c: New test.

    (cherry picked from commit de4eea7d7ea86e54843507c68d6672eca9d8c7bb)

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

* [Bug target/114981] [avr] Improve powi implementation
  2024-05-08  6:33 [Bug target/114981] New: [avr] Improve powi implementation gjl at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2024-05-09  8:31 ` cvs-commit at gcc dot gnu.org
@ 2024-05-10  9:59 ` cvs-commit at gcc dot gnu.org
  2024-05-10 10:02 ` cvs-commit at gcc dot gnu.org
  2024-05-10 10:06 ` gjl at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-05-10  9:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Georg-Johann Lay <gjl@gcc.gnu.org>:

https://gcc.gnu.org/g:af64af69c3cc85dbe00c520651a54850bf5cadc1

commit r15-360-gaf64af69c3cc85dbe00c520651a54850bf5cadc1
Author: Georg-Johann Lay <avr@gjlay.de>
Date:   Wed May 8 17:52:56 2024 +0200

    AVR: target/114981 - Tweak __builtin_powif / __powisf2

    Implement __powisf2 in assembly.

            PR target/114981
    libgcc/
            * config/avr/t-avr (LIB2FUNCS_EXCLUDE): Add _powisf2.
            (LIB1ASMFUNCS) [!avrtiny]: Add _powif.
            * config/avr/lib1funcs.S (mov4): New .macro.
            (L_powif, __powisf2) [!avrtiny]: New module and function.

    gcc/testsuite/
            * gcc.target/avr/pr114981-powif.c: New test.

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

* [Bug target/114981] [avr] Improve powi implementation
  2024-05-08  6:33 [Bug target/114981] New: [avr] Improve powi implementation gjl at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2024-05-10  9:59 ` cvs-commit at gcc dot gnu.org
@ 2024-05-10 10:02 ` cvs-commit at gcc dot gnu.org
  2024-05-10 10:06 ` gjl at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-05-10 10:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Georg-Johann Lay
<gjl@gcc.gnu.org>:

https://gcc.gnu.org/g:fcdd723779f9ad9af9638e11ffe56786de2d02ce

commit r14-10194-gfcdd723779f9ad9af9638e11ffe56786de2d02ce
Author: Georg-Johann Lay <avr@gjlay.de>
Date:   Wed May 8 17:52:56 2024 +0200

    AVR: target/114981 - Tweak __builtin_powif / __powisf2

    Implement __powisf2 in assembly.

            PR target/114981
    libgcc/
            * config/avr/t-avr (LIB2FUNCS_EXCLUDE): Add _powisf2.
            (LIB1ASMFUNCS) [!avrtiny]: Add _powif.
            * config/avr/lib1funcs.S (mov4): New .macro.
            (L_powif, __powisf2) [!avrtiny]: New module and function.

    gcc/testsuite/
            * gcc.target/avr/pr114981-powif.c: New test.

    (cherry picked from commit af64af69c3cc85dbe00c520651a54850bf5cadc1)

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

* [Bug target/114981] [avr] Improve powi implementation
  2024-05-08  6:33 [Bug target/114981] New: [avr] Improve powi implementation gjl at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2024-05-10 10:02 ` cvs-commit at gcc dot gnu.org
@ 2024-05-10 10:06 ` gjl at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: gjl at gcc dot gnu.org @ 2024-05-10 10:06 UTC (permalink / raw)
  To: gcc-bugs

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

Georg-Johann Lay <gjl at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
   Target Milestone|---                         |14.2
         Resolution|---                         |FIXED

--- Comment #7 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
The float variant is tweaked in v14.2+

The double variant is supported since v13.3+ and v14.2+.

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

end of thread, other threads:[~2024-05-10 10:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-08  6:33 [Bug target/114981] New: [avr] Improve powi implementation gjl at gcc dot gnu.org
2024-05-08  6:34 ` [Bug target/114981] " gjl at gcc dot gnu.org
2024-05-08 17:04 ` cvs-commit at gcc dot gnu.org
2024-05-09  8:10 ` cvs-commit at gcc dot gnu.org
2024-05-09  8:31 ` cvs-commit at gcc dot gnu.org
2024-05-10  9:59 ` cvs-commit at gcc dot gnu.org
2024-05-10 10:02 ` cvs-commit at gcc dot gnu.org
2024-05-10 10:06 ` gjl 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).