public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/52395] [4.7 Regression] Too conservative alignment info from SRA Date: Mon, 27 Feb 2012 13:52:00 -0000 [thread overview] Message-ID: <bug-52395-4-o3JBAAeBJu@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-52395-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52395 --- Comment #8 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-02-27 13:09:12 UTC --- The main issue is, of course, that we re-write base of the LHS of the assignments at all. Index: gcc/tree-sra.c =================================================================== --- gcc/tree-sra.c (revision 184591) +++ gcc/tree-sra.c (working copy) @@ -1480,6 +1480,10 @@ build_ref_for_offset (location_t loc, tr gcc_checking_assert (offset % BITS_PER_UNIT == 0); + if (offset == 0 + && types_compatible_p (exp_type, TREE_TYPE (base))) + return unshare_expr (base); + base = get_addr_base_and_unit_offset (base, &base_offset); /* get_addr_base_and_unit_offset returns NULL for references with a variable or, instead of re-writing *__x_1(D) = D.2219; to __x_1(D)->re = SR.1_11; __x_1(D)->im = SR.2_10; re-write it to SR.3_12 = COMPLEX_EXPR <SR.1_11, SR.2_12>; *__x_1(D) = SR.3_12; to avoid touching the non-replaced LHS.
next prev parent reply other threads:[~2012-02-27 13:09 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-02-27 7:50 [Bug tree-optimization/52395] New: [4.7 Regression] Alignment issue at O2 izamyatin at gmail dot com 2012-02-27 9:40 ` [Bug tree-optimization/52395] " rguenth at gcc dot gnu.org 2012-02-27 9:51 ` izamyatin at gmail dot com 2012-02-27 10:00 ` izamyatin at gmail dot com 2012-02-27 10:04 ` rguenth at gcc dot gnu.org 2012-02-27 10:06 ` rguenth at gcc dot gnu.org 2012-02-27 10:31 ` rguenth at gcc dot gnu.org 2012-02-27 10:49 ` [Bug tree-optimization/52395] [4.7 Regression] Too conservative alignment info from SRA rguenth at gcc dot gnu.org 2012-02-27 13:52 ` rguenth at gcc dot gnu.org [this message] 2012-02-27 14:55 ` rguenth at gcc dot gnu.org 2012-02-27 16:42 ` jamborm at gcc dot gnu.org 2012-02-27 17:19 ` jamborm at gcc dot gnu.org 2012-02-28 9:04 ` rguenther at suse dot de 2012-02-28 9:20 ` rguenth at gcc dot gnu.org 2012-02-28 9:29 ` rguenth at gcc dot gnu.org
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-52395-4-o3JBAAeBJu@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).