On Tue, 4 Oct 2016, Joseph Myers wrote: > On Tue, 4 Oct 2016, Richard Biener wrote: > > > Possibly. Though then for FP we also want - abs (a) -> copysign (a, -1). > > For architectures such as powerpc that have a negated-abs instruction, > does it get properly generated from the copysign code? (The relevant > pattern in rs6000.md uses (neg (abs)) - is that the correct canonical RTL > for this?)
I have no idea - given that there is no copysign RTL code I suppose it is the only machine independent RTL that can do this? The question would be whether the copysign optab of said targets would special-case the -1 case appropriately. Given your comment I'm putting the copysign part of the patch on the side for now. And I have to re-do the other part then. Richard.