public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/106594] New: [13 Regression] sign-extensions no longer merged into addressing mode
@ 2022-08-12 11:23 tnfchris at gcc dot gnu.org
  2022-08-12 12:04 ` [Bug tree-optimization/106594] " rguenth at gcc dot gnu.org
                   ` (28 more replies)
  0 siblings, 29 replies; 30+ messages in thread
From: tnfchris at gcc dot gnu.org @ 2022-08-12 11:23 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 106594
           Summary: [13 Regression] sign-extensions no longer merged into
                    addressing mode
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tnfchris at gcc dot gnu.org
  Target Milestone: ---
            Target: aarch64*

Since around the 5th of August (need to bisect) we no longer generate
addressing modes on load merging the sign extends.

The following example:

extern const int constellation_64qam[64];

void foo(int nbits,
         const char *p_src,
         int *p_dst) {

  while (nbits > 0U) {
    char first = *p_src++;

    char index1 = ((first & 0x3) << 4) | (first >> 4);

    *p_dst++ = constellation_64qam[index1];

    nbits--;
  }
}

used to generate

        orr     w3, w4, w3, lsr 4
        ldr     w3, [x6, w3, sxtw 2]

and now generates:

        orr     w0, w4, w0, lsr 4
        sxtw    x0, w0
        ldr     w0, [x6, x0, lsl 2]

at -O2 (-O1 seems to still be fine).  This is causing a regression in perf in
some of our libraries.

Looks like there's a change in how the operation is expressed.  It used to be

  first_17 = *p_src_28;
  _1 = (int) first_17;
  _2 = _1 << 4;
  _3 = (signed char) _2;

where the shift is done as an int, whereas now it's

  first_16 = *p_src_27;
  first.1_1 = (signed char) first_16;
  _2 = first.1_1 << 4;

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

end of thread, other threads:[~2024-05-21  9:12 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-12 11:23 [Bug tree-optimization/106594] New: [13 Regression] sign-extensions no longer merged into addressing mode tnfchris at gcc dot gnu.org
2022-08-12 12:04 ` [Bug tree-optimization/106594] " rguenth at gcc dot gnu.org
2022-08-12 12:44 ` tnfchris at gcc dot gnu.org
2022-08-12 14:01 ` roger at nextmovesoftware dot com
2022-08-12 14:48 ` tnfchris at gcc dot gnu.org
2022-08-12 17:01 ` roger at nextmovesoftware dot com
2022-08-13 11:34 ` [Bug rtl-optimization/106594] " roger at nextmovesoftware dot com
2022-08-14 12:07 ` tnfchris at gcc dot gnu.org
2022-08-17  1:05 ` hp at gcc dot gnu.org
2022-10-19  7:11 ` rguenth at gcc dot gnu.org
2022-10-19  7:52 ` roger at nextmovesoftware dot com
2023-01-17  4:06 ` roger at nextmovesoftware dot com
2023-02-27 10:00 ` tnfchris at gcc dot gnu.org
2023-02-27 10:03 ` ktkachov at gcc dot gnu.org
2023-03-04 22:26 ` segher at gcc dot gnu.org
2023-03-05  8:06 ` roger at nextmovesoftware dot com
2023-03-05 12:00 ` roger at nextmovesoftware dot com
2023-03-05 15:23 ` segher at gcc dot gnu.org
2023-03-05 19:23 ` tnfchris at gcc dot gnu.org
2023-03-06  7:51 ` rguenth at gcc dot gnu.org
2023-03-06 10:38 ` rsandifo at gcc dot gnu.org
2023-03-06 11:07 ` jakub at gcc dot gnu.org
2023-03-07 11:32 ` roger at nextmovesoftware dot com
2023-03-13  9:30 ` roger at nextmovesoftware dot com
2023-04-17 11:41 ` jakub at gcc dot gnu.org
2023-04-17 12:58 ` jakub at gcc dot gnu.org
2023-04-26  6:56 ` [Bug rtl-optimization/106594] [13/14 " rguenth at gcc dot gnu.org
2023-07-27  9:23 ` rguenth at gcc dot gnu.org
2023-10-30 16:19 ` segher at gcc dot gnu.org
2024-05-21  9:12 ` [Bug rtl-optimization/106594] [13/14/15 " jakub 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).