public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/115299] New: [14 regression] pr86722.c failed to eliminate branch.
@ 2024-05-31  5:09 liuhongt at gcc dot gnu.org
  2024-05-31  5:32 ` [Bug target/115299] " pinskia at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: liuhongt at gcc dot gnu.org @ 2024-05-31  5:09 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 115299
           Summary: [14 regression] pr86722.c failed to eliminate branch.
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Keywords: missed-optimization, needs-bisection
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: liuhongt at gcc dot gnu.org
  Target Milestone: ---
            Target: x86_64-*-* i?86-*-*

void f(double*d,double*e){
  for(;d<e;++d)
    *d=(*d<.5)?.7:0;
}


GCC14.1 -O2 generates

f:
        cmpq    %rsi, %rdi
        jnb     .L1
        movsd   .LC2(%rip), %xmm2
        movsd   .LC1(%rip), %xmm1
.L5:
        comisd  (%rdi), %xmm2
        movapd  %xmm1, %xmm0
        ja      .L3
        pxor    %xmm0, %xmm0
.L3:
        movsd   %xmm0, (%rdi)
        addq    $8, %rdi
        cmpq    %rsi, %rdi
        jb      .L5
.L1:
        ret

GCC12.3 -O2 

f:
        cmpq    %rsi, %rdi
        jnb     .L1
        movsd   .LC2(%rip), %xmm2
        movsd   .LC1(%rip), %xmm1
.L5:
        movsd   (%rdi), %xmm0
        addq    $8, %rdi
        cmpltsd %xmm2, %xmm0
        andpd   %xmm1, %xmm0
        movsd   %xmm0, -8(%rdi)
        cmpq    %rsi, %rdi
        jb      .L5
.L1:
        ret

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

end of thread, other threads:[~2024-06-04  2:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-31  5:09 [Bug target/115299] New: [14 regression] pr86722.c failed to eliminate branch liuhongt at gcc dot gnu.org
2024-05-31  5:32 ` [Bug target/115299] " pinskia at gcc dot gnu.org
2024-05-31  5:32 ` [Bug target/115299] [14/15 " pinskia at gcc dot gnu.org
2024-05-31  5:47 ` liuhongt at gcc dot gnu.org
2024-06-03  7:18 ` cvs-commit at gcc dot gnu.org
2024-06-03  7:20 ` liuhongt at gcc dot gnu.org
2024-06-04  2:16 ` cvs-commit 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).