Revital1 Eres <[EMAIL PROTECTED]> writes:

> Is there a general way to recognize a nop insn in RTL (using attributes?),
> or should I add a target hook for that?
>
> For example, I would like to recognize the following spu insn as a nop:?),
>
> (insn 555 210 203 11 (unspec_volatile [
>             (const_int 0 [0x0])
>         ] 14) 393 {lnop} (nil))

There is no general way to recognize a nop as such.  There are various
ways to recognize an insn which does nothing; such insns are normally
removed (there is still some code which checks and preserves
set_noop_p, but I have a feeling that code is now obsolete).

By gcc's standards your insn is not a nop, because it is volatile.

Ian

Reply via email to