public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/56631] New: duplicated sse code in switch
@ 2013-03-16 11:35 neleai at seznam dot cz
  2013-03-16 11:36 ` [Bug other/56631] " neleai at seznam dot cz
  2021-12-05 10:37 ` [Bug tree-optimization/56631] " pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: neleai at seznam dot cz @ 2013-03-16 11:35 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56631

             Bug #: 56631
           Summary: duplicated sse code in switch
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: neleai@seznam.cz


Consider attached testcase. When compiled with -Os,-O2,-O3 it duplicates
zeroing xmm1 register across all branches. Moving zeroing before braches will
save space.

Relevant assembly at -Os is

  jmp *.L19(,%rax,8)
  .section  .rodata
  .align 8
  .align 4
.L19:
  .quad .L21
  .quad .L4
  .quad .L5
snip 

.L21:
  xorps %xmm1, %xmm1
.L38:
  movaps  %xmm0, %xmm2
  pcmpeqb %xmm1, %xmm2
  pmovmskb  %xmm2, %eax
  testl %eax, %eax
  jne .L1
.L2:
  movdqu  %xmm0, (%rdi)
  addq  $64, %rdi
  movups  64(%rsi), %xmm0
  addq  $64, %rsi
  jmp .L38
.L4:
  xorps %xmm1, %xmm1
  incq  %rdi
.L23:
snip
.L5:
  xorps %xmm1, %xmm1
  addq  $2, %rdi


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

* [Bug other/56631] duplicated sse code in switch
  2013-03-16 11:35 [Bug other/56631] New: duplicated sse code in switch neleai at seznam dot cz
@ 2013-03-16 11:36 ` neleai at seznam dot cz
  2021-12-05 10:37 ` [Bug tree-optimization/56631] " pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: neleai at seznam dot cz @ 2013-03-16 11:36 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56631

--- Comment #1 from Ondrej Bilka <neleai at seznam dot cz> 2013-03-16 11:36:04 UTC ---
Created attachment 29678
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29678
testcase


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

* [Bug tree-optimization/56631] duplicated sse code in switch
  2013-03-16 11:35 [Bug other/56631] New: duplicated sse code in switch neleai at seznam dot cz
  2013-03-16 11:36 ` [Bug other/56631] " neleai at seznam dot cz
@ 2021-12-05 10:37 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-05 10:37 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|UNCONFIRMED                 |RESOLVED
          Component|target                      |tree-optimization

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed in GCC 7 by an extra copy loop header.

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

end of thread, other threads:[~2021-12-05 10:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-16 11:35 [Bug other/56631] New: duplicated sse code in switch neleai at seznam dot cz
2013-03-16 11:36 ` [Bug other/56631] " neleai at seznam dot cz
2021-12-05 10:37 ` [Bug tree-optimization/56631] " 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).