These folds raise 2 questions for me as I'm trying to eliminate the use of 'isFast' here:
- Do we need both 'arcp' and 'reassoc' to do this? My understanding is that -freciprocal-math allows this:
(X / Y) / Z --> X * (1.0 / Y) * (1.0 / Z)
...which wouldn't be useful here in InstCombine, but that might be a target-specific transform for the DAG.
If we are allowed to reassociate, then we reduce the above as:
X * (1.0 / Y) * (1.0 / Z) --> X * (1.0 / (Y * Z)) --> (X * 1.0) / (Y * Z) --> X / (Y * Z)
...but gcc currently says we can do this with just -freciprocal-math:
Should we allow this with just 'arcp'?
- We're applying the intersected FMF to the new fmul op. That results in strict fmul ops in the regression tests. Is that too conservative? Strict ops inhibit further reassociation and might cause more FMF removal in early-cse (because that also does FMF intersection).