Re: [PATCH] rs6000: Fix PTImode handling in power8 swap optimization pass [PR116415]

2024-08-30 Thread Peter Bergner
On 8/26/24 10:39 AM, Segher Boessenkool wrote: > On Thu, Aug 22, 2024 at 05:39:36PM +0800, Kewen.Lin wrote: >>> - if (ALTIVEC_OR_VSX_VECTOR_MODE (mode) || mode == TImode) >>> + if (ALTIVEC_OR_VSX_VECTOR_MODE (mode) || mode == TImode >>> + || mode == PTImode) >> >> Maybe

Re: [PATCH] rs6000: Fix PTImode handling in power8 swap optimization pass [PR116415]

2024-08-30 Thread Peter Bergner
On 8/26/24 10:45 AM, Segher Boessenkool wrote: > On Thu, Aug 22, 2024 at 08:48:19PM -0500, Peter Bergner wrote: >> I agree, there probably is code in the backend that currently handles TImode >> that should probably be changed to handle both by using your new macro. > > That is what mode classes a

Re: [PATCH] rs6000: Fix PTImode handling in power8 swap optimization pass [PR116415]

2024-08-26 Thread Segher Boessenkool
Hi! On Thu, Aug 22, 2024 at 08:48:19PM -0500, Peter Bergner wrote: > I was a little surprised we didn't have that macro already. Ok, consider > it changed with your suggestion. > > I agree, there probably is code in the backend that currently handles TImode > that should probably be changed to h

Re: [PATCH] rs6000: Fix PTImode handling in power8 swap optimization pass [PR116415]

2024-08-26 Thread Segher Boessenkool
Hi! On Thu, Aug 22, 2024 at 05:39:36PM +0800, Kewen.Lin wrote: > > - if (ALTIVEC_OR_VSX_VECTOR_MODE (mode) || mode == TImode) > > + if (ALTIVEC_OR_VSX_VECTOR_MODE (mode) || mode == TImode > > + || mode == PTImode) > > Maybe we can introduce a macro to this file like >

Re: [PATCH] rs6000: Fix PTImode handling in power8 swap optimization pass [PR116415]

2024-08-23 Thread Peter Bergner
On 8/22/24 8:48 PM, Peter Bergner wrote: > On 8/22/24 4:39 AM, Kewen.Lin wrote: >> OK for trunk and all active release branches with/without these nits tweaked, >> but please give others two days or so to comment, thanks! > > I'll make the suggested changes and push them to trunk when my new set o

Re: [PATCH] rs6000: Fix PTImode handling in power8 swap optimization pass [PR116415]

2024-08-22 Thread Peter Bergner
On 8/22/24 4:39 AM, Kewen.Lin wrote: > on 2024/8/21 21:14, Peter Bergner wrote: >> - if (ALTIVEC_OR_VSX_VECTOR_MODE (mode) || mode == TImode) >> + if (ALTIVEC_OR_VSX_VECTOR_MODE (mode) || mode == TImode >> + || mode == PTImode) > > Maybe we can introduce a macro to t

Re: [PATCH] rs6000: Fix PTImode handling in power8 swap optimization pass [PR116415]

2024-08-22 Thread Kewen.Lin
Hi Peter, on 2024/8/21 21:14, Peter Bergner wrote: > Our power8 swap optimization pass has some special handling for optimizing > swaps of TImode variables. The test case reported in bugzilla uses a call > to __atomic_compare_exchange, which introduces a variable of PTImode and > that does not g

[PATCH] rs6000: Fix PTImode handling in power8 swap optimization pass [PR116415]

2024-08-21 Thread Peter Bergner
Our power8 swap optimization pass has some special handling for optimizing swaps of TImode variables. The test case reported in bugzilla uses a call to __atomic_compare_exchange, which introduces a variable of PTImode and that does not get the same treatment as TImode leading to wrong code genera