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

--- Comment #21 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Jan Hubicka from comment #20)
> >   _2 = size_68(D) + 18446744073709551615;
> >   _3 = __builtin_constant_p (_2);
> Forgot to note, things would be easier if we folded this to _1 :)
> Among other we run on out of the limit on number of conditionals
> recorded by the fnsummary pass.

Maybe better just have a match.pd rule that would fold
y = z binop cst;
x = __builtin_constant_p (y);
to
x = __builtin_constant_p (z);
and let SCCVN do the rest (or do it in fwprop or whatever else if we'd want to
write it in C without having to enumerate all possible binops we want to do it
for).

Not sure if we shouldn't stop on ops that could trap though, or on ops that
could possibly be invalid...

Reply via email to