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

--- Comment #4 from Andrew Macleod <amacleod at redhat dot com> ---
(In reply to Jakub Jelinek from comment #3)
> Maybe ranger could figure out that at least one of the multiplication
> operands is zero in this case, because the second one is non-zero only if
> the first one is zero?

  _2 = b_6(D) == 0;
  _3 = (int) _2;
  _4 = _3 * b_6(D);

well, its kind of sort of predicate based.  I mean, the information is
calculable if one thought it was worth it. ie at the multiply, we know _3 is
[0, 1]   and we know b_6 is VARYING
because there are only 2 ranges in _3, you could calculate using GORI "if _3 is
[0,0], what is b_6?" (~[0, 0]) and "if _3 is [1,1], whats b_6?" [0,0]. do the 2
multiplies and union the results.. you'd get [0,0]


We might need a slight API tweak to be able to ask that.   we have fold_stmt
routines for the folding, but I dont think I have added any "what if" hooks to
GORI yet.

Reply via email to