This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/50067] [4.7 Regression] Wrong code with -fpredictive-commoning
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 22 Aug 2011 08:39:18 +0000
- Subject: [Bug tree-optimization/50067] [4.7 Regression] Wrong code with -fpredictive-commoning
- Auto-submitted: auto-generated
- References: <bug-50067-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50067
--- Comment #13 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-08-22 08:39:18 UTC ---
*sigh*, and when we fix it like
http://gcc.gnu.org/ml/gcc-patches/2011-08/msg01582.html then
gcc.dg/torture/pr44913.c is vectorized bogously because
dr_may_alias_p returns false for a[1] and a[-1] (and we don't compute any
difference vector).
I suppose dr_may_alias_p is completely wrong and does not want to know
whether
/* Returns false if we can prove that data references A and B do not alias,
true otherwise. */
but instead whether the data references may refer to the same base object
(plus, I guess, whether the references may alias using TBAA - though as
soon as we'd start to do strided stores that will break as well for
struct { int i; float f; } a[]).
But of course DR_BASE_OBJECT is not what we should adjust to "fix"
the dr_may_alias_p answer, but we need to adjust dr_may_alias_p instead
(and hope all users do mean to get the same kind of answer... other
than ddr init it is graphite that calls it, I will simply ignore that).