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

            Bug ID: 65088
           Summary: Does GCC has load/store widening phase?
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: m.zakirov at samsung dot com

This example says me that it doesn't.

$ cat t2.c

int a[2];
int b[2];

int main ()
{
  b[0] = a[0];
  b[1] = a[1];
  return 0;
}

$ gcc t2.c -O3 -S

$ cat t2.s

...

main:
.LFB0:
    .cfi_startproc
    movl    a(%rip), %eax
    movl    %eax, b(%rip)
    movl    a+4(%rip), %eax
    movl    %eax, b+4(%rip)
    xorl    %eax, %eax
    ret
    .cfi_endproc

gcc version is:

commit 71464ecd3a554b889c3bbc53d8874fc532bdf953
Author: trippels <trippels@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Mon Jan 12 07:53:10 2015 +0000

Reply via email to