public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "congh at google dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/63530] GCC generates incorrect aligned store on ARM after the loop is unrolled. Date: Wed, 15 Oct 2014 22:35:00 -0000 [thread overview] Message-ID: <bug-63530-4-T1Dy1dcpUF@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-63530-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63530 --- Comment #2 from Cong Hou <congh at google dot com> --- This issue can also be reproduced on x86_64. Compile the following code with options (assume the file name is t.c): -O2 -ftree-vectorize t.c -fdump-tree-all-alias #include <stdlib.h> typedef struct { unsigned char map[256]; int i; } A, *AP; AP foo(int n) { AP b = malloc(sizeof(A)); int i; for (i = n; i < 256; i++) b->map[i] = i; return b; } The from t.c.116t.vect we can find such a statement: # ALIGN = 8, MISALIGN = 0 vectp_b.15_47 = b_5 + _48; Here b_5 is obtained from malloc which can be 8 bytes aligned, but _48 is from input parameter n, and the alignment of vectp_b.15_47 should be unknown instead of 8 here. I suspect the ptr_info_def object of vectp_b.15_47 is just copied from that of b_5, which is incorrect.
next prev parent reply other threads:[~2014-10-15 22:35 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-10-14 2:24 [Bug tree-optimization/63530] New: " congh at google dot com 2014-10-14 22:19 ` [Bug tree-optimization/63530] " carrot at google dot com 2014-10-15 22:35 ` congh at google dot com [this message] 2014-10-17 0:46 ` carrot at google dot com 2014-10-22 16:04 ` carrot at gcc dot gnu.org 2014-10-28 1:44 ` carrot at gcc dot gnu.org 2014-10-28 12:52 ` ramana at gcc dot gnu.org 2014-10-28 16:47 ` carrot at google dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-63530-4-T1Dy1dcpUF@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).