On 04/30/2015 03:00 AM, Richard Biener wrote:
Without looking too close at this patch I'll note that we might want to
improve the previous one first to also handle a constant 2nd operand
for the operation (your new one also misses that).
Yea, I think you mentioned in that in the 47477 BZ as well. If you've
got testcases, pass them along so that we can build testcases around
those forms as well.
and it was noticed multiple times that the type comparison boiler-plate
needs some helper function. Like
Yes. It's on the TODO list. There's certainly more follow-ups in the
pipeline. If we want to factor out the boiler-plate now, that works for me.
And if you'd like to lend helping hands to adding patterns then transitioning
patterns from fold-const.c to match.pd is more appreciated than inventing
new ones ;)
The next round of work is much more likely to be reimplementing the
operand shortening code shared between the C/C++ front-ends in match.pd
and removal of the C/C++ operand shortening code.
This patch didn't fit into that work terribly well and seemed
self-contained enough to go forward now rather than waiting.
Jeff