Even after my tree combine pass, there are some math function builtins which I still not simplify
because I do not regimplify calls expression yet. I will handle this case after I sumbit and commit my
double t(double x)
x = -x;
x = cos (x);
double t1(double x)
x = cos (-x);
I should note that cos(-x) == cos(x);
The two FIXMEs in my tree combiner:
/* FIXME: do not abort for the call case as this can happen for an example
-cos(-a) == cos (a) but this does not show up here as we reject it when
calculating the size. */
/* If we have more than three or zero, we cannot handle this case so we
return a relatively huge count saying we cannot handle it.
FIXME: Handle the cost of a call expression. */
It might be a while for me to rewrite the tree combiner so unassigning for now.
*** Bug 55180 has been marked as a duplicate of this bug. ***
I have a patch using match-and-simplify.
Date: Mon Aug 17 04:47:45 2015
New Revision: 226934
2015-08-17 Richard Biener <email@example.com>
Naveen H.S <Naveen.Hurugalawadi@caviumnetworks.com>
* match.pd (div (coss (op @0) : New simplifier.
Fixed a few months ago.