Re: [PATCH] x86: Update BB_HEAD when aligning BB_HEAD

2024-08-12 Thread Richard Sandiford
"H.J. Lu" writes: > On Mon, Aug 12, 2024 at 4:25 AM Jakub Jelinek wrote: >> >> On Mon, Aug 12, 2024 at 04:19:58AM -0700, H.J. Lu wrote: >> > > This is wrong. As documented, BB_HEAD needs to be either a CODE_LABEL, >> > > or >> > > NOTE_INSN_BASIC_BLOCK. >> > >> > ira.cc has >> > >> >

Re: [PATCH] x86: Update BB_HEAD when aligning BB_HEAD

2024-08-12 Thread H.J. Lu
On Mon, Aug 12, 2024 at 4:25 AM Jakub Jelinek wrote: > > On Mon, Aug 12, 2024 at 04:19:58AM -0700, H.J. Lu wrote: > > > This is wrong. As documented, BB_HEAD needs to be either a CODE_LABEL, or > > > NOTE_INSN_BASIC_BLOCK. > > > > ira.cc has > > > > new_insn = emit_insn_before (PATTERN

Re: [PATCH] x86: Update BB_HEAD when aligning BB_HEAD

2024-08-12 Thread Jakub Jelinek
On Mon, Aug 12, 2024 at 04:19:58AM -0700, H.J. Lu wrote: > > This is wrong. As documented, BB_HEAD needs to be either a CODE_LABEL, or > > NOTE_INSN_BASIC_BLOCK. > > ira.cc has > > new_insn = emit_insn_before (PATTERN (def_insn), use_insn); > REG_NOTES (new_insn) = REG_NOTES

Re: [PATCH] x86: Update BB_HEAD when aligning BB_HEAD

2024-08-12 Thread H.J. Lu
On Mon, Aug 12, 2024 at 12:25 AM Jakub Jelinek wrote: > > On Thu, Aug 08, 2024 at 06:53:10PM -0700, H.J. Lu wrote: > > When we emit .p2align to align BB_HEAD, we must update BB_HEAD. Otherwise > > ENDBR will be inserted as the wrong place. > > > > gcc/ > > > > PR target/116174 > > * c

Re: [PATCH] x86: Update BB_HEAD when aligning BB_HEAD

2024-08-12 Thread Jakub Jelinek
On Thu, Aug 08, 2024 at 06:53:10PM -0700, H.J. Lu wrote: > When we emit .p2align to align BB_HEAD, we must update BB_HEAD. Otherwise > ENDBR will be inserted as the wrong place. > > gcc/ > > PR target/116174 > * config/i386/i386.cc (ix86_align_loops): Update BB_HEAD when > alig