public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/82325] worse code generated compared to clang when using a constexpr array
       [not found] <bug-82325-4@http.gcc.gnu.org/bugzilla/>
@ 2023-01-19  4:24 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; only message in thread
From: pinskia at gcc dot gnu.org @ 2023-01-19  4:24 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |middle-end

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note clang 15+ no longer unrolls the loop and even produces really bad code for
the loop now:
.LBB0_7:                                #   in Loop: Header=BB0_1 Depth=1
        addq    $2, %rdx
.LBB0_1:                                # =>This Inner Loop Header: Depth=1
        movzwl  -4(%rax,%rdx,4), %esi
        cmpl    %edi, %esi
        jg      .LBB0_3
# %bb.2:                                #   in Loop: Header=BB0_1 Depth=1
        movzbl  -2(%rax,%rdx,4), %ecx
        movl    $1, %r8d
        shll    %cl, %r8d
        addl    %esi, %r8d
        cmpl    %edi, %r8d
        jg      .LBB0_8
.LBB0_3:                                #   in Loop: Header=BB0_1 Depth=1
        cmpq    $29, %rdx
        je      .LBB0_4
# %bb.5:                                #   in Loop: Header=BB0_1 Depth=1
        movzwl  (%rax,%rdx,4), %esi
        cmpl    %edi, %esi
        jg      .LBB0_7
# %bb.6:                                #   in Loop: Header=BB0_1 Depth=1
        movzbl  2(%rax,%rdx,4), %ecx
        movl    $1, %r8d
        shll    %cl, %r8d
        addl    %esi, %r8d
        cmpl    %edi, %r8d
        jle     .LBB0_7

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-19  4:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-82325-4@http.gcc.gnu.org/bugzilla/>
2023-01-19  4:24 ` [Bug middle-end/82325] worse code generated compared to clang when using a constexpr array 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).