validate_replace_rtx_1 fix

Richard Kenner kenner@vlsi1.ultra.nyu.edu
Thu May 17 11:18:00 GMT 2001


+    /* Constant ought to go second.  */

I'd clarify this by saying that a constant ought to go second unless ...

However, I think perhaps a better way to do this which is much clearer
is to have helper function which is given an RTX and returns the
preference (note spelling)!.  So it would return 0 for CONST_INT, 1
for CONST_DOUBLE, 2 for other CONSTANT_P, 3 for SUBREG, and 4 for
"complex expression".

Then the new function would return 1 iff the preference of the first
operand is less than that of the second.



More information about the Gcc-patches mailing list