> On 3 Jul 2024, at 14:22, Richard Biener <rguent...@suse.de> wrote:
> 
> External email: Use caution opening links or attachments
> 
> 
> On Wed, 3 Jul 2024, Jennifer Schmitz wrote:
> 
>> 
> 
> OK.

I’ve pushed the patch on Jennifer’s behalf with 
8dc5ad3ce8d4d2cd6cc2b7516d282395502fdf7d .
One thing I noticed is that the patch had DOS-style line endings (which render 
as ^M on many Linux editors and break common tools like patch -p1).
You may want to have a look at your editor settings to ensure that it uses Unix 
line endings.
On a vim editor it’s something like “set ff=unix”.
I’ve fixed them up in the patch before committing in this case.

Welcome to the GCC community!
Thanks,
Kyrill


> 
> Thanks,
> Richard.
> 
>>> On 2 Jul 2024, at 15:01, Richard Biener <rguent...@suse.de> wrote:
>>> 
>>> External email: Use caution opening links or attachments
>>> 
>>> 
>>> On Tue, 2 Jul 2024, Jennifer Schmitz wrote:
>>> 
>>>> 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?
>>> 
>>> You put that into /* Fold comparisons against built-in math functions.  */
>>> but it fits more the group of simplifications around
>>> 
>>> /* Simplification of math builtins.  These rules must all be optimizations
>>>  as well as IL simplifications.  If there is a possibility that the new
>>>  form could be a pessimization, the rule should go in the
>>> canonicalization
>>> ...
>>> 
>>> where we already have sqrt related foldings.  Please put it there.
>> Done, thank you. I have bootstrapped and tested the patch again for the new 
>> location.
>>> 
>>> Otherwise this looks OK.
>>> 
>>> Richard.
>>> 
>>>> 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.
>>>> 
>>> 
>>> --
>>> Richard Biener <rguent...@suse.de>
>>> SUSE Software Solutions Germany GmbH,
>>> Frankenstrasse 146, 90461 Nuernberg, Germany;
>>> GF: Ivo Totev, Andrew McDonald, Werner Knoblich; (HRB 36809, AG Nuernberg)
>> 
> 
> --
> Richard Biener <rguent...@suse.de>
> SUSE Software Solutions Germany GmbH,
> Frankenstrasse 146, 90461 Nuernberg, Germany;
> GF: Ivo Totev, Andrew McDonald, Werner Knoblich; (HRB 36809, AG Nuernberg)


Reply via email to