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

            Bug ID: 89028
           Summary: 8-byte loop isn't vectorized
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com
  Target Milestone: ---

[hjl@gnu-skx-1 v64-2]$ cat y.i
void
rsqrt(char* restrict r, char* restrict a){
    for (int i = 0; i < 8; i++){
        r[i] += a[i];
    }
}
[hjl@gnu-skx-1 v64-2]$ gcc -S -O2 y.i
[hjl@gnu-skx-1 v64-2]$ cat y.s
        .file   "y.i"
        .text
        .p2align 4,,15
        .globl  rsqrt
        .type   rsqrt, @function
rsqrt:
.LFB0:
        .cfi_startproc
        xorl    %eax, %eax
        .p2align 4,,10
        .p2align 3
.L2:
        movzbl  (%rsi,%rax), %edx
        addb    %dl, (%rdi,%rax)
        addq    $1, %rax
        cmpq    $8, %rax
        jne     .L2
        ret
        .cfi_endproc
.LFE0:
        .size   rsqrt, .-rsqrt
        .ident  "GCC: (GNU) 8.2.1 20190109 (Red Hat 8.2.1-7)"
        .section        .note.GNU-stack,"",@progbits
[hjl@gnu-skx-1 v64-2]$

Reply via email to