Re: [PATCH 1/2] allow contraction to synthetic single-element vector FMA

2025-07-01 Thread Richard Biener
On Mon, Jun 30, 2025 at 7:05 PM Alexander Monakov wrote: > > > On Mon, 30 Jun 2025, Richard Biener wrote: > > > > * gcc.target/i386/pr116979.c > > > > > > Here we check that FMA is used for complex multiplication. This is a case > > > where use of FMA is detrimental for accuracy, but I guess we ca

Re: [PATCH 1/2] allow contraction to synthetic single-element vector FMA

2025-06-30 Thread Alexander Monakov
On Mon, 30 Jun 2025, Richard Biener wrote: > > * gcc.target/i386/pr116979.c > > > > Here we check that FMA is used for complex multiplication. This is a case > > where use of FMA is detrimental for accuracy, but I guess we can choose > > to preserve the status quo. I can look into teaching > > e

Re: [PATCH 1/2] allow contraction to synthetic single-element vector FMA

2025-06-30 Thread Richard Biener
On Mon, Jun 30, 2025 at 9:54 AM Richard Biener wrote: > > On Fri, Jun 27, 2025 at 3:45 PM Alexander Monakov wrote: > > > > > > On Fri, 27 Jun 2025, Richard Biener wrote: > > > > > > I am testing partial fixes for these issues. > > > > > > Can you check again after r16-1731-g08bdb6b4a32f1f? > > >

Re: [PATCH 1/2] allow contraction to synthetic single-element vector FMA

2025-06-30 Thread Richard Biener
On Fri, Jun 27, 2025 at 3:45 PM Alexander Monakov wrote: > > > On Fri, 27 Jun 2025, Richard Biener wrote: > > > > I am testing partial fixes for these issues. > > > > Can you check again after r16-1731-g08bdb6b4a32f1f? > > Certainly. There's no more fmaddsub-related testsuite failures, and only >

Re: [PATCH 1/2] allow contraction to synthetic single-element vector FMA

2025-06-27 Thread Alexander Monakov
On Fri, 27 Jun 2025, Richard Biener wrote: > > I am testing partial fixes for these issues. > > Can you check again after r16-1731-g08bdb6b4a32f1f? Certainly. There's no more fmaddsub-related testsuite failures, and only three tests need adjustment on x86. * gcc.target/i386/pr116979.c Here

Re: [PATCH 1/2] allow contraction to synthetic single-element vector FMA

2025-06-27 Thread Richard Biener
On Wed, Jun 25, 2025 at 11:39 AM Richard Biener wrote: > > On Tue, Jun 24, 2025 at 5:25 PM Alexander Monakov wrote: > > > > > I'd say we want to fix these kind of things before switching the default. > > > Can > > > you file bugreports for the distinct issues you noticed when adjusting the > >

Re: [PATCH 1/2] allow contraction to synthetic single-element vector FMA

2025-06-25 Thread Richard Biener
On Tue, Jun 24, 2025 at 5:25 PM Alexander Monakov wrote: > > > I'd say we want to fix these kind of things before switching the default. > > Can > > you file bugreports for the distinct issues you noticed when adjusting the > > testcases? > > Sure, filed https://gcc.gnu.org/bugzilla/show_bug.cgi

Re: [PATCH 1/2] allow contraction to synthetic single-element vector FMA

2025-06-24 Thread Alexander Monakov
> > On Fri, May 23, 2025 at 2:31 PM Alexander Monakov > > wrote: > > > > > > In PR 105965 we accepted a request to form FMA instructions when the > > > source code is using a narrow generic vector that contains just one > > > element, corresponding to V1SF or V1DF mode, while the backend does not

Re: [PATCH 1/2] allow contraction to synthetic single-element vector FMA

2025-06-24 Thread Alexander Monakov
On Tue, 24 Jun 2025, Richard Biener wrote: > On Tue, Jun 24, 2025 at 1:18 PM Alexander Monakov wrote: > > > > > > On Fri, May 23, 2025 at 2:31 PM Alexander Monakov > > > > wrote: > > > > > > > > > > In PR 105965 we accepted a request to form FMA instructions when the > > > > > source code is

Re: [PATCH 1/2] allow contraction to synthetic single-element vector FMA

2025-06-24 Thread Richard Biener
On Tue, Jun 24, 2025 at 4:28 PM Alexander Monakov wrote: > > > > Thanks! Any thoughts on the other patch in the thread, about flipping > > > -ffp-contract from =fast to =on? > > > > I can't find this mail, not in spam either, but I'm OK with such change if > > it > > comes with test coverage. > >

Re: [PATCH 1/2] allow contraction to synthetic single-element vector FMA

2025-06-24 Thread Alexander Monakov
> I'd say we want to fix these kind of things before switching the default. Can > you file bugreports for the distinct issues you noticed when adjusting the > testcases? Sure, filed https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120808 for the most frequently hit issue on x86 for now. > I suppose

Re: [PATCH 1/2] allow contraction to synthetic single-element vector FMA

2025-06-24 Thread Alexander Monakov
> > Thanks! Any thoughts on the other patch in the thread, about flipping > > -ffp-contract from =fast to =on? > > I can't find this mail, not in spam either, but I'm OK with such change if it > comes with test coverage. Ouch, let me reproduce it below. About test coverage, I'm not exactly sure w

Re: [PATCH 1/2] allow contraction to synthetic single-element vector FMA

2025-06-24 Thread Richard Biener
On Tue, Jun 24, 2025 at 1:53 PM Alexander Monakov wrote: > > > > On Tue, 24 Jun 2025, Richard Biener wrote: > > > On Tue, Jun 24, 2025 at 1:18 PM Alexander Monakov > > wrote: > > > > > > > > On Fri, May 23, 2025 at 2:31 PM Alexander Monakov > > > > > wrote: > > > > > > > > > > > > In PR 105965

Re: [PATCH 1/2] allow contraction to synthetic single-element vector FMA

2025-06-24 Thread Richard Biener
On Tue, Jun 24, 2025 at 1:18 PM Alexander Monakov wrote: > > > > On Fri, May 23, 2025 at 2:31 PM Alexander Monakov > > > wrote: > > > > > > > > In PR 105965 we accepted a request to form FMA instructions when the > > > > source code is using a narrow generic vector that contains just one > > > >

Re: [PATCH 1/2] allow contraction to synthetic single-element vector FMA

2025-05-26 Thread Alexander Monakov
On Mon, 26 May 2025, Richard Biener wrote: > On Fri, May 23, 2025 at 2:31 PM Alexander Monakov wrote: > > > > In PR 105965 we accepted a request to form FMA instructions when the > > source code is using a narrow generic vector that contains just one > > element, corresponding to V1SF or V1DF mo

Re: [PATCH 1/2] allow contraction to synthetic single-element vector FMA

2025-05-26 Thread Richard Biener
On Fri, May 23, 2025 at 2:31 PM Alexander Monakov wrote: > > In PR 105965 we accepted a request to form FMA instructions when the > source code is using a narrow generic vector that contains just one > element, corresponding to V1SF or V1DF mode, while the backend does not > expand fma patterns fo

[PATCH 1/2] allow contraction to synthetic single-element vector FMA

2025-05-23 Thread Alexander Monakov
In PR 105965 we accepted a request to form FMA instructions when the source code is using a narrow generic vector that contains just one element, corresponding to V1SF or V1DF mode, while the backend does not expand fma patterns for such modes. For this to work under -ffp-contract=on, we either ne