Re: Move fold_trunc_transparent_mathfn to match.pd

2015-10-23 Thread Richard Biener
On Fri, Oct 23, 2015 at 9:56 AM, Richard Sandiford wrote: > Richard Biener writes: >>> @@ -12963,11 +12959,11 @@ tree_single_nonnegative_warnv_p (tree t, >> bool *strict_overflow_p, int depth) >>> If this code misses important cases that unbounded recursion >>> would not, passes

Re: Move fold_trunc_transparent_mathfn to match.pd

2015-10-23 Thread Richard Sandiford
Richard Biener writes: >> @@ -12963,11 +12959,11 @@ tree_single_nonnegative_warnv_p (tree t, > bool *strict_overflow_p, int depth) >> If this code misses important cases that unbounded recursion >> would not, passes that need this information could be revised >> to provi

Re: Move fold_trunc_transparent_mathfn to match.pd

2015-10-22 Thread Richard Biener
On Thu, Oct 22, 2015 at 1:00 PM, Richard Sandiford wrote: > This moves the fold rules for trunc, floor, ceil, round, nearbyint and > rint in one go, since they're tested as a group. Most of the code is > supporting the f(x)->x fold when x is known to be integer-valued. > Like with the non-negativ

Move fold_trunc_transparent_mathfn to match.pd

2015-10-22 Thread Richard Sandiford
This moves the fold rules for trunc, floor, ceil, round, nearbyint and rint in one go, since they're tested as a group. Most of the code is supporting the f(x)->x fold when x is known to be integer-valued. Like with the non-negative test, this is probably more elegantly handled by tracking range i