From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CFCAD385843E; Fri, 17 Jun 2022 21:59:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CFCAD385843E From: "hjl.tools at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/106022] New: [12/13 Regression] Enable vectorizer generates extra load Date: Fri, 17 Jun 2022 21:59:49 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jun 2022 21:59:49 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106022 Bug ID: 106022 Summary: [12/13 Regression] Enable vectorizer generates extra load Product: gcc Version: 12.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: hjl.tools at gmail dot com CC: crazylht at gmail dot com Target Milestone: --- [hjl@gnu-clx-1 gcc-bisect]$ cat x.c void foo(char * c) { c[0] =3D 0; c[1] =3D 1; c[2] =3D 2; c[3] =3D 3; } [hjl@gnu-clx-1 gcc-bisect]$ gcc -O3 x.c -S [hjl@gnu-clx-1 gcc-bisect]$ cat x.s=20 .file "x.c" .text .p2align 4 .globl foo .type foo, @function foo: .LFB0: .cfi_startproc movl .LC0(%rip), %eax movl %eax, (%rdi) ret .cfi_endproc .LFE0: .size foo, .-foo .section .rodata.cst4,"aM",@progbits,4 .align 4 .LC0: .byte 0 .byte 1 .byte 2 .byte 3 .ident "GCC: (GNU) 12.1.1 20220507 (Red Hat 12.1.1-1)" .section .note.GNU-stack,"",@progbits [hjl@gnu-clx-1 gcc-bisect]$ gcc -O3 x.c -S -fno-tree-vectorize [hjl@gnu-clx-1 gcc-bisect]$ cat x.s .file "x.c" .text .p2align 4 .globl foo .type foo, @function foo: .LFB0: .cfi_startproc movl $50462976, (%rdi) ret .cfi_endproc .LFE0: .size foo, .-foo .ident "GCC: (GNU) 12.1.1 20220507 (Red Hat 12.1.1-1)" .section .note.GNU-stack,"",@progbits [hjl@gnu-clx-1 gcc-bisect]$ /usr/gcc-11.2.1-x32/bin/gcc -S -O3 x.c=20 [hjl@gnu-clx-1 gcc-bisect]$ cat x.s .file "x.c" .text .p2align 4 .globl foo .type foo, @function foo: .LFB0: .cfi_startproc movl $50462976, (%rdi) ret .cfi_endproc .LFE0: .size foo, .-foo .ident "GCC: (GNU) 11.2.1 20220118" .section .note.GNU-stack,"",@progbits [hjl@gnu-clx-1 gcc-bisect]$=