[Bug tree-optimization/101511] [12 Regression] ice in query_relation, at value-relation.cc:879

2021-07-22 Thread amacleod at redhat dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101511

Andrew Macleod  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #5 from Andrew Macleod  ---
fixed

[Bug tree-optimization/101511] [12 Regression] ice in query_relation, at value-relation.cc:879

2021-07-22 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101511

Martin Liška  changed:

   What|Removed |Added

 CC||marxin at gcc dot gnu.org
   Last reconfirmed||2021-07-22
 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW

[Bug tree-optimization/101511] [12 Regression] ice in query_relation, at value-relation.cc:879

2021-07-22 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101511

--- Comment #4 from CVS Commits  ---
The master branch has been updated by Andrew Macleod :

https://gcc.gnu.org/g:d3fa77472b78c5ddada03a1052b229bea11cb76f

commit r12-2466-gd3fa77472b78c5ddada03a1052b229bea11cb76f
Author: Andrew MacLeod 
Date:   Mon Jul 19 15:54:57 2021 -0400

Allow non-symmetrical equivalences.

Don't trap if equivalences are processed out of DOM order, and aren't
completely symmetrical.  We will eventually resolve this, but its OK for
now.

gcc/
PR tree-optimization/101511
* value-relation.cc (relation_oracle::query_relation): Check if
ssa1
is in ssa2's equiv set, and don't trap if so.

gcc/testsuite/
* g++.dg/pr101511.C: New.

[Bug tree-optimization/101511] [12 Regression] ice in query_relation, at value-relation.cc:879

2021-07-19 Thread amacleod at redhat dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101511

Andrew Macleod  changed:

   What|Removed |Added

 CC||aldyh at gcc dot gnu.org

--- Comment #3 from Andrew Macleod  ---
The new relation code is dominance based,  in the interest of efficiency, it
can currently miss the odd equivalence if things are processed in a
non-dominance order.

Its not incorrect, it just may lead to a missed opportunity.

This testcase triggers an assert which checks for this situation.  There are
numerous UNDEFINED values, and we end up register an equivalences:

 Registering value_relation (Error_18 == _4) (bb4) at Error_18 = _4 + Error_13;
 Registering value_relation (Error_13 == _4) (bb2) at Error_13 = _4 + Error_9;

Not we register the bb4 equivalence first,  and then alter register the one in
bb2.

As a result, we don't currently update post dominated blocks, so we dont
combine these into Error_18, Error_13 and _4 in bb4.
When we later check for an equivalence between we detect this anomaly.
There is nothing incorrect in allowing it, and we'll do so for now.  
Eventually, when its flushed out better, we'll change this back to an assert.

[Bug tree-optimization/101511] [12 Regression] ice in query_relation, at value-relation.cc:879

2021-07-19 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101511

--- Comment #2 from David Binderman  ---
I've had a go at a git bisect, but couldn't produce any sensible answers ;-<

Richard seems to think Andrew MacLeod may be helpful, so I am happy
to go with that.

For the git range I suggested, commits 
4c85ff754927c518ed97da5e0221eeea742c9aa7,
a03e944e92ee51ae583382079d4739b64bd93b35, 
ca4d381662c37733b2a1d49d6c8f5fcfc1348f3d and
9d674b735f22aa9cf85629851783ce38f25087b5 are by Andrew.

[Bug tree-optimization/101511] [12 Regression] ice in query_relation, at value-relation.cc:879

2021-07-19 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101511

Richard Biener  changed:

   What|Removed |Added

Summary|ice in query_relation, at   |[12 Regression] ice in
   |value-relation.cc:879   |query_relation, at
   ||value-relation.cc:879
 CC||amacleod at redhat dot com
   Target Milestone|--- |12.0
   Keywords||ice-on-valid-code
  Component|c++ |tree-optimization