> This would suggest that you can use the pattern also for performing a normal
> add in case the condition code is not needed afterwards but this isn't
> correct for s390 31 bit where an address calculation is actually something
> different.

Then you should document that by stating that the pattern is guaranteed to be 
invoked only for addresses (and may not clobber the condition code).

> addptr is better I think because it is a pattern which is
> supposed to be implemented with a load address instruction and the
> middle-end guarantees to use it only on addresses. (I hope LRA is actually
> behaving that way).

Hoping isn't sufficient IMO here, you need to rename/rework emit_add3_insn and 
possibly stop the compiler if the value it is invoked on is not an address.

-- 
Eric Botcazou

Reply via email to