On 07/30/2010 03:15 PM, Richard Guenther wrote:
I think we can have negative shift counts (at least the constant folding
code suggests so), this is why I have the code as-is.
No, that seems very weird. Sure expand does not handle it, and the
implementation-defined section of the manual does not mention it. I'm more
inclined to consider it a historical wart, given this comment:
/* Previously detected shift-counts computed by NEGATE_EXPR
and shifted in the other direction; but that does not work
on all machines. */
dating back to the beginning of the GCC repo. I wonder what the attached
patch would do.