public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/110181] New: longlong.h for RISCV should define count_leading_zeros and count_trailing_zeros and COUNT_LEADING_ZEROS_0 when ZBB is enabled
@ 2023-06-08 20:05 pinskia at gcc dot gnu.org
  2023-06-08 20:06 ` [Bug target/110181] " pinskia at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-08 20:05 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110181
           Summary: longlong.h for RISCV should define count_leading_zeros
                    and count_trailing_zeros and COUNT_LEADING_ZEROS_0
                    when ZBB is enabled
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---
            Target: riscv

I noticed that divdi3 on riscv32 with ZBB extensions always enabled still emits
a lookup table but we really should just use __builtin_clzll/__builtin_clz (for
the instruction).

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

* [Bug target/110181] longlong.h for RISCV should define count_leading_zeros and count_trailing_zeros and COUNT_LEADING_ZEROS_0 when ZBB is enabled
  2023-06-08 20:05 [Bug target/110181] New: longlong.h for RISCV should define count_leading_zeros and count_trailing_zeros and COUNT_LEADING_ZEROS_0 when ZBB is enabled pinskia at gcc dot gnu.org
@ 2023-06-08 20:06 ` pinskia at gcc dot gnu.org
  2023-06-08 20:11 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-08 20:06 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |pinskia at gcc dot gnu.org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2023-06-08

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
My team is working on this.
It is more important for RISCV32 rather than RISCV64 due to not as many people
use 128bit integers (note this will also improve support for _BitInt too).

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

* [Bug target/110181] longlong.h for RISCV should define count_leading_zeros and count_trailing_zeros and COUNT_LEADING_ZEROS_0 when ZBB is enabled
  2023-06-08 20:05 [Bug target/110181] New: longlong.h for RISCV should define count_leading_zeros and count_trailing_zeros and COUNT_LEADING_ZEROS_0 when ZBB is enabled pinskia at gcc dot gnu.org
  2023-06-08 20:06 ` [Bug target/110181] " pinskia at gcc dot gnu.org
@ 2023-06-08 20:11 ` jakub at gcc dot gnu.org
  2023-06-08 22:18 ` pinskia at gcc dot gnu.org
  2023-12-13  0:39 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-06-08 20:11 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
More importantly, we don't have __builtin_{clz,ctz,ffs} builtin variant that
would work on __uint128_t (or _BitInt), nor some type-generic variant of it.

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

* [Bug target/110181] longlong.h for RISCV should define count_leading_zeros and count_trailing_zeros and COUNT_LEADING_ZEROS_0 when ZBB is enabled
  2023-06-08 20:05 [Bug target/110181] New: longlong.h for RISCV should define count_leading_zeros and count_trailing_zeros and COUNT_LEADING_ZEROS_0 when ZBB is enabled pinskia at gcc dot gnu.org
  2023-06-08 20:06 ` [Bug target/110181] " pinskia at gcc dot gnu.org
  2023-06-08 20:11 ` jakub at gcc dot gnu.org
@ 2023-06-08 22:18 ` pinskia at gcc dot gnu.org
  2023-12-13  0:39 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-08 22:18 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement

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

* [Bug target/110181] longlong.h for RISCV should define count_leading_zeros and count_trailing_zeros and COUNT_LEADING_ZEROS_0 when ZBB is enabled
  2023-06-08 20:05 [Bug target/110181] New: longlong.h for RISCV should define count_leading_zeros and count_trailing_zeros and COUNT_LEADING_ZEROS_0 when ZBB is enabled pinskia at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-06-08 22:18 ` pinskia at gcc dot gnu.org
@ 2023-12-13  0:39 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-12-13  0:39 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEW
           Assignee|pinskia at gcc dot gnu.org         |unassigned at gcc dot gnu.org

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
No longer working on this.

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

end of thread, other threads:[~2023-12-13  0:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-08 20:05 [Bug target/110181] New: longlong.h for RISCV should define count_leading_zeros and count_trailing_zeros and COUNT_LEADING_ZEROS_0 when ZBB is enabled pinskia at gcc dot gnu.org
2023-06-08 20:06 ` [Bug target/110181] " pinskia at gcc dot gnu.org
2023-06-08 20:11 ` jakub at gcc dot gnu.org
2023-06-08 22:18 ` pinskia at gcc dot gnu.org
2023-12-13  0:39 ` pinskia 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).