Re: [PATCH] rs6000: __builtin_darn[_raw] should be in [power9-64] (PR103624)

2021-12-15 Thread Bill Schmidt via Gcc-patches
On 12/15/21 12:41 PM, Segher Boessenkool wrote: > On Wed, Dec 15, 2021 at 08:00:02AM -0600, Bill Schmidt wrote: >>> No, all builtins should work in either mode, and always return long. >>> If the patterns are broken, the *patterns* should be fixed :-) >> OK, thanks! This is much clearer now. >>

Re: [PATCH] rs6000: __builtin_darn[_raw] should be in [power9-64] (PR103624)

2021-12-15 Thread Segher Boessenkool
On Wed, Dec 15, 2021 at 08:00:02AM -0600, Bill Schmidt wrote: > > No, all builtins should work in either mode, and always return long. > > If the patterns are broken, the *patterns* should be fixed :-) > > OK, thanks! This is much clearer now. > > I've opened an internal issue about the

Re: [PATCH] rs6000: __builtin_darn[_raw] should be in [power9-64] (PR103624)

2021-12-15 Thread Bill Schmidt via Gcc-patches
On 12/14/21 8:23 PM, Segher Boessenkool wrote: > On Tue, Dec 14, 2021 at 07:32:30AM -0600, Bill Schmidt wrote: >> On 12/13/21 6:22 PM, Segher Boessenkool wrote: >>> On Mon, Dec 13, 2021 at 02:37:43PM -0600, Bill Schmidt wrote: On 12/13/21 10:54 AM, Segher Boessenkool wrote: > On Mon,

Re: [PATCH] rs6000: __builtin_darn[_raw] should be in [power9-64] (PR103624)

2021-12-14 Thread Segher Boessenkool
On Tue, Dec 14, 2021 at 07:32:30AM -0600, Bill Schmidt wrote: > On 12/13/21 6:22 PM, Segher Boessenkool wrote: > > On Mon, Dec 13, 2021 at 02:37:43PM -0600, Bill Schmidt wrote: > >> On 12/13/21 10:54 AM, Segher Boessenkool wrote: > >>> On Mon, Dec 13, 2021 at 11:30:28AM -0500, David Edelsohn

Re: [PATCH] rs6000: __builtin_darn[_raw] should be in [power9-64] (PR103624)

2021-12-14 Thread Bill Schmidt via Gcc-patches
On 12/14/21 7:32 AM, Bill Schmidt wrote: > Hi! > > On 12/13/21 6:22 PM, Segher Boessenkool wrote: >> >> These builtins should just return a "long", just like __builtin_ppc_mftb >> does. All three of them. > Well, that seems wrong for __builtin_darn_32, which maps to an SImode pattern. > > So, I

Re: [PATCH] rs6000: __builtin_darn[_raw] should be in [power9-64] (PR103624)

2021-12-14 Thread Bill Schmidt via Gcc-patches
Hi! On 12/13/21 6:22 PM, Segher Boessenkool wrote: > On Mon, Dec 13, 2021 at 02:37:43PM -0600, Bill Schmidt wrote: >> On 12/13/21 10:54 AM, Segher Boessenkool wrote: >>> On Mon, Dec 13, 2021 at 11:30:28AM -0500, David Edelsohn wrote: On Mon, Dec 13, 2021 at 10:48 AM Bill Schmidt

Re: [PATCH] rs6000: __builtin_darn[_raw] should be in [power9-64] (PR103624)

2021-12-13 Thread Segher Boessenkool
On Mon, Dec 13, 2021 at 02:37:43PM -0600, Bill Schmidt wrote: > On 12/13/21 10:54 AM, Segher Boessenkool wrote: > > On Mon, Dec 13, 2021 at 11:30:28AM -0500, David Edelsohn wrote: > >> On Mon, Dec 13, 2021 at 10:48 AM Bill Schmidt > >> wrote: > >>> PR103624 observes that we get segfaults for the

Re: [PATCH] rs6000: __builtin_darn[_raw] should be in [power9-64] (PR103624)

2021-12-13 Thread Bill Schmidt via Gcc-patches
Hi! On 12/13/21 10:54 AM, Segher Boessenkool wrote: > On Mon, Dec 13, 2021 at 11:30:28AM -0500, David Edelsohn wrote: >> On Mon, Dec 13, 2021 at 10:48 AM Bill Schmidt wrote: >>> Hi! >>> >>> PR103624 observes that we get segfaults for the 64-bit darn builtins when >>> compiled >>> on a 32-bit

Re: [PATCH] rs6000: __builtin_darn[_raw] should be in [power9-64] (PR103624)

2021-12-13 Thread Segher Boessenkool
On Mon, Dec 13, 2021 at 11:30:28AM -0500, David Edelsohn wrote: > On Mon, Dec 13, 2021 at 10:48 AM Bill Schmidt wrote: > > > > Hi! > > > > PR103624 observes that we get segfaults for the 64-bit darn builtins when > > compiled > > on a 32-bit architecture. The old built-in infrastructure

Re: [PATCH] rs6000: __builtin_darn[_raw] should be in [power9-64] (PR103624)

2021-12-13 Thread David Edelsohn via Gcc-patches
On Mon, Dec 13, 2021 at 10:48 AM Bill Schmidt wrote: > > Hi! > > PR103624 observes that we get segfaults for the 64-bit darn builtins when > compiled > on a 32-bit architecture. The old built-in infrastructure requires > TARGET_64BIT, and > this was missed in the new support. Moving these two

[PATCH] rs6000: __builtin_darn[_raw] should be in [power9-64] (PR103624)

2021-12-13 Thread Bill Schmidt via Gcc-patches
Hi! PR103624 observes that we get segfaults for the 64-bit darn builtins when compiled on a 32-bit architecture. The old built-in infrastructure requires TARGET_64BIT, and this was missed in the new support. Moving these two builtins from the [power9] stanza to the [power9-64] stanza solves