Re: Move cabs simplifications to match.pd

2015-10-19 Thread Richard Biener
On October 19, 2015 4:42:23 PM GMT+02:00, Richard Sandiford wrote: >The fold code also expanded cabs(x+yi) to fsqrt(x*x+y*y) when >optimising >for speed. tree-ssa-math-opts.c has this transformation too, but >unlike >the fold code, it first checks whether the target implements the sqrt >optab.

Move cabs simplifications to match.pd

2015-10-19 Thread Richard Sandiford
The fold code also expanded cabs(x+yi) to fsqrt(x*x+y*y) when optimising for speed. tree-ssa-math-opts.c has this transformation too, but unlike the fold code, it first checks whether the target implements the sqrt optab. The patch simply removes the fold code and keeps the tree-ssa-math-opts.c l