Operand constrain specification

Hi,

How can I specify in a .td file that source and destination should not use the same register?

Thanks.

  • Elena

Hi,

How can I specify in a .td file that source and destination should
not use the same register?

I think that you can use the EarlyClobber operand flag to achieve this (TableGen has an @earlyclobber constraint; there are some examples in the ARM backend).

-Hal

Hey Elena,

We use @earlyclobber. E.g.

let Constraints = "@earlyclobber $dst" {
...
}

-Cameron

Hi,

How can I specify in a .td file that source and destination should
not use the same register?

I think that you can use the EarlyClobber operand flag to achieve this (TableGen has an @earlyclobber constraint; there are some examples in the ARM backend).

Yes, that’s exactly what that constraint is for.

-Jim

Thank you, it helps!