Hello, I am working on a gcc porting for a new instruction. This
instruction needs to move data from memory to two registers. So I use
the SET rtx, and the dest of SET is an UNSPEC rtx with two registers.
By using such a rtl pattern, gcc performs very differently. It makes
mistakes for register replacement and instruction reordering.
For example, when gcc optimizes in pass_cse, it performs register
substitution of registers in UNSPEC rtx without checking the validity
of the resulting insn.
So I wonder about the UNSPEC rtx.

What's the usage of UNSPEC rtx?

And do you have a better rtl pattern for this new instruction?

Thanks,
Jacy

Reply via email to