This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug bootstrap/69123] [6 Regression] --with-build-config='bootstrap-O3 bootstrap-debug' miscompiled stage 2


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69123

--- Comment #17 from Alexandre Oliva <aoliva at gcc dot gnu.org> ---
Author: aoliva
Date: Mon Jan 11 10:40:33 2016
New Revision: 232218

URL: https://gcc.gnu.org/viewcvs?rev=232218&root=gcc&view=rev
Log:
[PR69123] fix handling of MEMs in VTA to avoid dataflow oscillation

The problem arises because we used to drop overwritten MEMs from loc
lists of VALUEs, but not of other onepart variables, and it just so
happens that, by doing so, block 6 in the testcase has no D#5 in its
output in the first pass, because the MEM holding its (previous) value
was correctly dropped from value 88:88, but gains it in the second
pass because D#5 has the MEM location incoming directly in its loc
list, rather than indirectly in a VALUE.

This incorrect binding enables other blocks to believe they have a
tentative binding for D#5 in some cycles, but others, still operating
on the early conclusion, believe there isn't, and they oscillate from
that.

Since we check for escaping MEMs in clobbers, we won't lose anything
relevant by dropping call-clobbered or overwritten MEMs in all onepart
variables, and this ensures the loc intersection operation in onepart
vars won't let a MEM through that wasn't present in earlier
iterations.

for  gcc/ChangeLog

        PR bootstrap/69123
        * var-tracking.c (drop_overlapping_mem_locs): Operate on all
        onepart vars.  Fix typo in comment.  Fix reversed condition in
        unshare test.
        (dataflow_set_remove_mem_locs): Operate on all onepart vars.

for gcc/testsuite/ChangeLog

        PR bootstrap/69123
        * g++.dg/pr69123.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/pr69123.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/var-tracking.c

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]