[Bug tree-optimization/59303] [4.9 Regression] uninit-pred-8_b.c and uninit-pred-9_b.c fail after better optimizations
xinliangli at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Dec 19 18:30:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59303
--- Comment #5 from davidxl <xinliangli at gmail dot com> ---
Fixing this requires more powerful predicate analysis with the help of value
equivalent classes.
>From the dump:
"Use in stmt blah (v_1);
is guarded by :
if (_23 != 0)"
_23 = pephitmp_22 | _8, so the use guard is
prephitmp_22 != 0 || _8 != 0
prephitmp_22 = PHI <0(13), prephitmp_21(3), so the guard can be translated to
prephitmp_21 != 0 || _8 != 0
prephitmp_21 = r_9(D) <= 19, so the predicate becomes
r_9(D) <= 19 || _8 != 0
For the def:
[CHECK] Found def edge 1 in v_1 = PHI <v_14(D)(13), r_9(D)(3)>
Operand defs of phi v_1 = PHI <v_14(D)(13), r_9(D)(3)>
is guarded by :
if (_8 != 0)
(.OR.)
(.NOT.) if (_8 != 0)
(.AND.)
if (_13 != 0)
the predicate is
_8 != 0 || _13 != 0
where _13 = _10 | _12, 10_ = (r_9(D) <= 19), _12 = l_11(D) != 0
so the predicate is
_8 != 0 || r_9(D) <= 19 || 1_11(D) != 0
which is the superset for the use.
Perhaps we need to do around of predicate normalization before comparison.
David
More information about the Gcc-bugs
mailing list