Re: [PATCH]middle-end: fix ICE when moving statements to empty BB [PR113731]

2024-02-06 Thread Richard Biener
On Tue, 6 Feb 2024, Jakub Jelinek wrote: > On Mon, Feb 05, 2024 at 03:31:20PM +0100, Richard Biener wrote: > > On Mon, 5 Feb 2024, Tamar Christina wrote: > > > > It looks like LOOP_VINFO_EARLY_BRK_STORES is "reverse"? Is that > > > > why you are doing gsi_move_before + gsi_prev? Why do gsi_prev

Re: [PATCH]middle-end: fix ICE when moving statements to empty BB [PR113731]

2024-02-06 Thread Jakub Jelinek
On Mon, Feb 05, 2024 at 03:31:20PM +0100, Richard Biener wrote: > On Mon, 5 Feb 2024, Tamar Christina wrote: > > > It looks like LOOP_VINFO_EARLY_BRK_STORES is "reverse"? Is that > > > why you are doing gsi_move_before + gsi_prev? Why do gsi_prev > > > at all? > > > > > > > As discussed on IRC,

RE: [PATCH]middle-end: fix ICE when moving statements to empty BB [PR113731]

2024-02-05 Thread Richard Biener
On Mon, 5 Feb 2024, Tamar Christina wrote: > > It looks like LOOP_VINFO_EARLY_BRK_STORES is "reverse"? Is that > > why you are doing gsi_move_before + gsi_prev? Why do gsi_prev > > at all? > > > > As discussed on IRC, then how about this one. > Incremental building passed all tests and bootstr

RE: [PATCH]middle-end: fix ICE when moving statements to empty BB [PR113731]

2024-02-05 Thread Tamar Christina
> It looks like LOOP_VINFO_EARLY_BRK_STORES is "reverse"? Is that > why you are doing gsi_move_before + gsi_prev? Why do gsi_prev > at all? > As discussed on IRC, then how about this one. Incremental building passed all tests and bootstrap is running. Ok for master if bootstrap and regtesting

RE: [PATCH]middle-end: fix ICE when moving statements to empty BB [PR113731]

2024-02-05 Thread Tamar Christina
> -Original Message- > From: Richard Biener > Sent: Monday, February 5, 2024 1:22 PM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; j...@ventanamicro.com > Subject: Re: [PATCH]middle-end: fix ICE when moving statements to empty BB > [PR113731] > >

Re: [PATCH]middle-end: fix ICE when moving statements to empty BB [PR113731]

2024-02-05 Thread Richard Biener
On Mon, 5 Feb 2024, Tamar Christina wrote: > Hi All, > > We use gsi_move_before (&stmt_gsi, &dest_gsi); to request that the new > statement > be placed before any other statement. Typically this then moves the current > pointer to be after the statement we just inserted. > > However it looks l

[PATCH]middle-end: fix ICE when moving statements to empty BB [PR113731]

2024-02-05 Thread Tamar Christina
Hi All, We use gsi_move_before (&stmt_gsi, &dest_gsi); to request that the new statement be placed before any other statement. Typically this then moves the current pointer to be after the statement we just inserted. However it looks like when the BB is empty, this does not happen and the CUR po