[Bug tree-optimization/84670] [8 Regression] ICE: in compute_antic_aux, at tree-ssa-pre.c:2148 with -O2 -fno-tree-dominator-opts
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Mar 5 08:35:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84670
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |needs-reduction
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Gerald Pfeifer from comment #6)
> Created attachment 43559 [details]
> A testcase from Wine (fairly bigger)
>
> This is a testcase from a full Wine build. The others probably are
> better to nail this down, but for verification just in case a first
> fix addresses those but might not cover this one as well.
A fix for the original testcase in this bug also fixes this one (I can
reproduce the ICE with -O2 -m32 on x86_64-linux).
The other two testcases are unrelated - further reduction would be nice
with inclusion of the following to avoid reducing to a testcase for the
issue I have a patch for. Note that in the end I'm going to remove
the assert again - none of the testcases exhibit the infinite antic-in
computation issues.
Index: gcc/tree-ssa-pre.c
===================================================================
--- gcc/tree-ssa-pre.c (revision 258124)
+++ gcc/tree-ssa-pre.c (working copy)
@@ -1393,8 +1393,12 @@ phi_translate_1 (pre_expr expr, bitmap_s
else
{
unsigned value_id = get_expr_value_id (constant);
- constant = find_leader_in_sets (value_id, set1, set2,
- AVAIL_OUT (pred));
+ /* We want a leader in ANTIC_OUT to be consistent
+ with the rest of phi_translate but we don't have
+ that available (and it isn't complete yet) so
+ we resort to AVAIL_OUT here. */
+ constant = bitmap_find_leader (AVAIL_OUT (pred),
+ value_id);
if (constant)
return constant;
}
The original use of set1/set2 is clearly bogus here, as the comment now
states we'd like to use ANTIC_OUT (pred) here but we are computing that
right now. AVAIL_OUT is at least correct even if not 100% in spirit of
this function. The other testcases show that phi_translate is effectively
removing things from the set which is what causes the issue.
More information about the Gcc-bugs
mailing list