public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/114936] New: [14/15 Regression] Typo in aarch64-ldp-fusion.cc:combine_reg_notes
@ 2024-05-03 13:05 acoplan at gcc dot gnu.org
  2024-05-03 13:13 ` [Bug target/114936] " acoplan at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: acoplan at gcc dot gnu.org @ 2024-05-03 13:05 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114936

            Bug ID: 114936
           Summary: [14/15 Regression] Typo in
                    aarch64-ldp-fusion.cc:combine_reg_notes
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: acoplan at gcc dot gnu.org
  Target Milestone: ---

aarch64-ldp-fusion.cc:combine_reg_notes has:

  result = filter_notes (REG_NOTES (i2->rtl ()), result,
                         &found_eh_region, fr_expr);
  result = filter_notes (REG_NOTES (i1->rtl ()), result,
                         &found_eh_region, fr_expr + 1);

  if (!load_p)
    {
      // Simple frame-related sp-relative saves don't need CFI notes, but when
      // we combine them into an stp we will need a CFI note as dwarf2cfi can't
      // interpret the unspec pair representation directly.
      if (RTX_FRAME_RELATED_P (i1->rtl ()) && !fr_expr[0])
        fr_expr[0] = copy_rtx (PATTERN (i1->rtl ()));
      if (RTX_FRAME_RELATED_P (i2->rtl ()) && !fr_expr[1])
        fr_expr[1] = copy_rtx (PATTERN (i2->rtl ()));
    }

so any REG_FRAME_RELATED_EXPR from i2 goes to fr_expr[0] and likewise i1 goes
to fr_expr[1], but then we have the opposite association inside the if
statement.

Many thanks to Matthew Malcomson for pointing this out to me.

I'm going to post the (arguably obvious) patch after testing that writes to
fr_expr + 1 first when we call filter_notes for i2.  We may want to consider a
backport to GCC 14 too.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-05-08 10:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-03 13:05 [Bug target/114936] New: [14/15 Regression] Typo in aarch64-ldp-fusion.cc:combine_reg_notes acoplan at gcc dot gnu.org
2024-05-03 13:13 ` [Bug target/114936] " acoplan at gcc dot gnu.org
2024-05-03 13:55 ` rguenth at gcc dot gnu.org
2024-05-08 10:55 ` cvs-commit at gcc dot gnu.org
2024-05-08 10:58 ` [Bug target/114936] [14 " acoplan at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).