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/52406] [4.7 Regression] likely wrong code bug Date: Tue, 28 Feb 2012 14:37:00 -0000 [thread overview] Message-ID: <bug-52406-4-v3x4V9WMTb@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-52406-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52406 Richard Guenther <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |50067 --- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-02-28 14:32:58 UTC --- The issue is that we want to disambiguate a[i].f1 and a[i].f2, so for the "base object" we zero out all known indices, resulting in a[0].f1 and a[0].f2 which we then disambiguate (and conclude that for all i there cannot be a dependence). Now, when we mix pointer accesses with array accesses most of the index analysis falls apart (which is what the fix for PR50067 tries to make work more reliably - see its comment #13 on the dr_may_alias_p issue ...) So, it's really wrong to try to fixup DR_BASE_OBJECT to make dr_may_alias_p work, and it is equally wrong to use DR_BASE_OBJECT in dr_may_alias_p. Using DR_REF (a safe bet) falls foul of failing a load of testcases, for example gcc.dg/vect/pr37027.c which is no longer vectorized because (compute_affine_dependence stmt_a: D.1722_7 = a[i_24].f1; stmt_b: D.1725_11 = a[i_24].f2; ) -> dependence analysis failed previously we'd have used a[0].f1 and a[0].f2 in the disambiguation in dr_may_alias_p and disambiguated the accesses. We can try a similar trick as with REALPART/IMAGPART_EXPR to recover this. Add a constant access function for outer COMPONENT_REFs (those we can strip off the base object).
next prev parent reply other threads:[~2012-02-28 14:33 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-02-27 18:15 [Bug c/52406] New: " regehr at cs dot utah.edu 2012-02-27 22:54 ` [Bug tree-optimization/52406] [4.7 Regression] " jakub at gcc dot gnu.org 2012-02-28 9:59 ` jakub at gcc dot gnu.org 2012-02-28 10:21 ` jakub at gcc dot gnu.org 2012-02-28 10:44 ` rguenth at gcc dot gnu.org 2012-02-28 11:32 ` rguenth at gcc dot gnu.org 2012-02-28 14:37 ` rguenth at gcc dot gnu.org [this message] 2012-03-01 11:42 ` rguenth at gcc dot gnu.org 2012-03-02 15:00 ` [Bug tree-optimization/52406] [4.7/4.8 " rguenth at gcc dot gnu.org 2012-03-02 15:05 ` [Bug tree-optimization/52406] [4.7 " rguenth at gcc dot gnu.org 2012-03-14 9:35 ` izamyatin at gmail dot com 2012-04-03 14:33 ` rguenth at gcc dot gnu.org 2012-04-03 14:34 ` 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-52406-4-v3x4V9WMTb@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).