>>(insn 1 0 2 0 (set (reg/v:Xmode r)
>>        (sign_extend:Xmode (op:Ymode (...))))
>>(insn 2 1 3 0 (set (lhs) (rhs)))

> To summarise, the change above is not unreasonable and I'd be
> happy to allow this change to simplify-rtx.c, but I'd be more
> cautious about where and why it was used.  For example, if you're
> sure nothing bad can happen in the LHS, it might be reasonable
> to instead place this code in a simplify_replace_set() function.

I want to replace every use of (reg r) with the extension.  There might 
be such use on the LHS, this is why the LHS might change.

1. Can you please give me an example of something bad that can happen to 
the LHS.  Maybe I'm missing something here.

2. After calling simplify_replace_rtx I try to recognize the instruction.
Is this been cautious or is it unnecessary?

3. Isn't it reasonable to expect that every instance on old_rtx will be 
replaced by new_rtx even if it can't be simplified?
This is what I understand from the function's documentation.
But actually every expressions that can't be simplified is not replaced.


Thanks,
Leehod.

Reply via email to