This patch adds a pattern in match.pd folding x/sqrt(x) to sqrt(x) for 
-funsafe-math-optimizations. Test cases were added for double, float, and long 
double.

The patch was bootstrapped and regtested on aarch64-linux-gnu, no regression.
Ok for mainline?

Signed-off-by: Jennifer Schmitz <jschm...@nvidia.com>

gcc/

        * match.pd: Fold x/sqrt(x) to sqrt(x).

gcc/testsuite/

        * gcc.dg/tree-ssa/sqrt_div.c: New test.

Attachment: fold_sqrt.patch
Description: Binary data

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to