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

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

2024-08-11 Thread H.J. Lu
On Sun, Aug 11, 2024 at 6:52 PM Hongtao Liu wrote: > > On Mon, Aug 12, 2024 at 6:59 AM H.J. Lu wrote: > > > > On Thu, Aug 8, 2024 at 6:53 PM 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. > >

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

2024-08-11 Thread Hongtao Liu
On Mon, Aug 12, 2024 at 6:59 AM H.J. Lu wrote: > > On Thu, Aug 8, 2024 at 6:53 PM 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/i38

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

2024-08-11 Thread H.J. Lu
On Thu, Aug 8, 2024 at 6:53 PM 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 > aligning

[PATCH] x86: Update BB_HEAD when aligning BB_HEAD

2024-08-08 Thread H.J. Lu
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 aligning BB_HEAD gcc/testsuite/ PR target/116174 * gc