Only transform rotate to rotatert and v.v. if target has both
authorSegher Boessenkool <segher@kernel.crashing.org>
Wed, 2 Jul 2014 20:19:19 +0000 (22:19 +0200)
committerSegher Boessenkool <segher@gcc.gnu.org>
Wed, 2 Jul 2014 20:19:19 +0000 (22:19 +0200)
commit4ed3092ff8fe1a769f8c18d3f215cfafaf44a95d
tree55483e0c6041d55004fd9e1326e9f7d35571d985
parent1680a432083fd5e3c7e84a246595f3df9e9165d7
Only transform rotate to rotatert and v.v. if target has both

Many targets do not have both rotate and rotatert.  Of the 47 targets
in the tree, 17 have both, 9 have only rotate, 2 have only rotatert, and
19 have neither (this is based on "grep -wil" so it can be slightly off).

rs6000 has only rotate, and mips has only rotatert.  For such targets
simplifying rotate to rotatert and vice versa is not simplifying things
at all.  rs6000 has already way too many rotate patterns (some days it
seems like two thousand, but it is somewhat less in reality still); I
would prefer not to double that again.

So, this patch makes genrecog define HAVE_rotate and HAVE_rotatert if
those RTL codes are mentioned anywhere in the machine description, and
then does the transformation in simplify-rtx.c only if both these flags
are set.

From-SVN: r212239
gcc/ChangeLog
gcc/genconfig.c
gcc/simplify-rtx.c