On 11/13/18 5:38 PM, Peter Bergner wrote:
> On 11/13/18 2:53 AM, Eric Botcazou wrote:
>>> +static rtx
>>> +simple_move_operator (rtx x)
>>> +{
>>> + /* A word sized rotate of a register pair is equivalent to swapping
>>> + the registers in the register pair. */
>>> + if (GET_CODE (x) == ROTATE
>>> + && GET_MODE (x) == twice_word_mode
>>> + && simple_move_operand (XEXP (x, 0))
>>> + && CONST_INT_P (XEXP (x, 1))
>>> + && INTVAL (XEXP (x, 1)) == BITS_PER_WORD)
>>> + return XEXP (x, 0);;
>>> +
>>> + return NULL_RTX;
>>> +}
>>> +
>>
>> Superfluous semi-colon. Given that the function returns an operand, its
>> name
>> is IMO misleading, so maybe [get_]operand_for_simple_move_operator.
>
> Fixed and renamed function to operand_for_simple_move_operator.
Would not operand_for_swap_move_operator be better? This is not a "simple
move", it is something that requires swapping the words of the operand.
(Presumably one could think of other operators that generate a swap, and match
them here. I can't think of another one off the top of my head though.)
r~