public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/103298] New: [12 regressions] regressions on arm after r12-5301
@ 2021-11-17  8:45 clyon at gcc dot gnu.org
  2021-11-17  8:49 ` [Bug tree-optimization/103298] " pinskia at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: clyon at gcc dot gnu.org @ 2021-11-17  8:45 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103298
           Summary: [12 regressions] regressions on arm after r12-5301
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: clyon at gcc dot gnu.org
  Target Milestone: ---

r12-5301 is causing regressions on some arm targets:

arm-none-linux-gnueabi -march=armv7-a -mthumb:
FAIL: gcc.target/arm/pr42093.c scan-assembler-not tbb
FAIL: gcc.target/arm/pr43920-2.c object-size text <= 54

arm-none-linux-gnueabi -march=armv5t -mthumb:
FAIL: gcc.dg/tree-ssa/if-to-switch-3.c scan-tree-dump iftoswitch "Condition
chain with [^\n\r]* BBs transformed into a switch statement."

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

* [Bug tree-optimization/103298] [12 regressions] regressions on arm after r12-5301
  2021-11-17  8:45 [Bug tree-optimization/103298] New: [12 regressions] regressions on arm after r12-5301 clyon at gcc dot gnu.org
@ 2021-11-17  8:49 ` pinskia at gcc dot gnu.org
  2021-11-17 21:38 ` pinskia at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-17  8:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Christophe Lyon from comment #0) 
> arm-none-linux-gnueabi -march=armv5t -mthumb:
> FAIL: gcc.dg/tree-ssa/if-to-switch-3.c scan-tree-dump iftoswitch "Condition
> chain with [^\n\r]* BBs transformed into a switch statement."

PR 103278.

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

* [Bug tree-optimization/103298] [12 regressions] regressions on arm after r12-5301
  2021-11-17  8:45 [Bug tree-optimization/103298] New: [12 regressions] regressions on arm after r12-5301 clyon at gcc dot gnu.org
  2021-11-17  8:49 ` [Bug tree-optimization/103298] " pinskia at gcc dot gnu.org
@ 2021-11-17 21:38 ` pinskia at gcc dot gnu.org
  2021-11-18  7:44 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-17 21:38 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.0
           Keywords|                            |missed-optimization

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

* [Bug tree-optimization/103298] [12 regressions] regressions on arm after r12-5301
  2021-11-17  8:45 [Bug tree-optimization/103298] New: [12 regressions] regressions on arm after r12-5301 clyon at gcc dot gnu.org
  2021-11-17  8:49 ` [Bug tree-optimization/103298] " pinskia at gcc dot gnu.org
  2021-11-17 21:38 ` pinskia at gcc dot gnu.org
@ 2021-11-18  7:44 ` rguenth at gcc dot gnu.org
  2021-11-18  9:38 ` [Bug testsuite/103298] " rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-18  7:44 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2021-11-18

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
I will have a look.

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

* [Bug testsuite/103298] [12 regressions] regressions on arm after r12-5301
  2021-11-17  8:45 [Bug tree-optimization/103298] New: [12 regressions] regressions on arm after r12-5301 clyon at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-11-18  7:44 ` rguenth at gcc dot gnu.org
@ 2021-11-18  9:38 ` rguenth at gcc dot gnu.org
  2021-11-18 11:36 ` rearnsha at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-18  9:38 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|rguenth at gcc dot gnu.org         |unassigned at gcc dot gnu.org
                 CC|                            |ramana at gcc dot gnu.org,
                   |                            |rguenth at gcc dot gnu.org
             Status|ASSIGNED                    |NEW
          Component|tree-optimization           |testsuite

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Christophe Lyon from comment #0)
> r12-5301 is causing regressions on some arm targets:
> 
> arm-none-linux-gnueabi -march=armv7-a -mthumb:
> FAIL: gcc.target/arm/pr42093.c scan-assembler-not tbb

The testcase seems to be for a wrong-code issue but was implemented as
scan-assembler one which is now seemingly dependent on switch expansion
heuristics.

Previously we got

        ldr     pc, [r6, r2, lsl #2]
        .align  2
.L6:
        .word   .L14+1
...

but now

        cmp     r2, #50
        bhi     .L1
        tbb     [pc, r2]
.L5:
        .byte   (.L7-.L5)/2
...

which  looks more optimal to me.  So the testcase is simply bogus?  Defering
to ARM folks.


> FAIL: gcc.target/arm/pr43920-2.c object-size text <= 54

--- a/pr43920-2.s       2021-11-18 10:32:22.975744703 +0100
+++ b/pr43920-2.s       2021-11-18 10:31:56.763399263 +0100
@@ -34,18 +34,19 @@
        mov     r0, r7
        bl      lseek
        adds    r2, r4, #1
-       beq     .L4
-       adds    r3, r0, #1
        beq     .L1
+       adds    r3, r0, #1
+       beq     .L4
        subs    r0, r0, r4
        beq     .L4
        str     r4, [r6]
+       movs    r4, #0
        str     r0, [r5]
-       movs    r0, #0
 .L1:
+       mov     r0, r4
        pop     {r3, r4, r5, r6, r7, pc}
 .L4:
-       mov     r0, #-1
+       mov     r4, #-1
        b       .L1

well ...  .optimized change:

--- a/pr43920-2.c.250t.optimized        2021-11-18 10:32:22.951744385 +0100
+++ b/pr43920-2.c.250t.optimized        2021-11-18 10:31:56.739398949 +0100
@@ -39,7 +39,7 @@
   *length__13(D) = length_10;

   <bb 6> [local count: 1073741824]:
-  # _2 = PHI <end_9(3), 0(5), start_7(2), -1(4)>
+  # _2 = PHI <start_7(2), 0(5), end_9(3), -1(4)>
   return _2;

 }

-Coalesce list: (2)_2 & (9)end_9 [map: 0, 3] : Success -> 0
-Coalesce list: (2)_2 & (7)start_7 [map: 0, 2] : Fail due to conflict
+Coalesce list: (2)_2 & (7)start_7 [map: 0, 2] : Success -> 0
+Coalesce list: (2)_2 & (9)end_9 [map: 0, 3] : Fail due to conflict

-Inserting a partition copy on edge BB2->BB6 : PART.1 = PART.3
+Inserting a partition copy on edge BB3->BB6 : PART.1 = PART.3

looks like a fuss to me (fragile testcase).  Not sure if it is worth trying
to for example sort PHI args after SSA name version for increased stability,
at RTL expansion time we have exactly the same number of copies but I guess
(just guess) that at RA time things start to differ.

Again, ARM folks - please allow for the extra reg copy.

> arm-none-linux-gnueabi -march=armv5t -mthumb:
> FAIL: gcc.dg/tree-ssa/if-to-switch-3.c scan-tree-dump iftoswitch "Condition
> chain with [^\n\r]* BBs transformed into a switch statement."

should be fixed now.

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

* [Bug testsuite/103298] [12 regressions] regressions on arm after r12-5301
  2021-11-17  8:45 [Bug tree-optimization/103298] New: [12 regressions] regressions on arm after r12-5301 clyon at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-11-18  9:38 ` [Bug testsuite/103298] " rguenth at gcc dot gnu.org
@ 2021-11-18 11:36 ` rearnsha at gcc dot gnu.org
  2022-05-06  8:31 ` jakub at gcc dot gnu.org
  2023-05-08 12:23 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rearnsha at gcc dot gnu.org @ 2021-11-18 11:36 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
The test looks fragile.

The instructions TBB and TBH can only support forward branches.  If a label in
the list of switch targets is backwards then they can't be used and a
non-compressed table must be used.

My guess is that what's happening here is that with other changes to the code
generation all the branches are now forwards and that the TBB/TBH optimisation
can be legitimately applied.

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

* [Bug testsuite/103298] [12 regressions] regressions on arm after r12-5301
  2021-11-17  8:45 [Bug tree-optimization/103298] New: [12 regressions] regressions on arm after r12-5301 clyon at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2021-11-18 11:36 ` rearnsha at gcc dot gnu.org
@ 2022-05-06  8:31 ` jakub at gcc dot gnu.org
  2023-05-08 12:23 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-05-06  8:31 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|12.0                        |12.2

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 12.1 is being released, retargeting bugs to GCC 12.2.

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

* [Bug testsuite/103298] [12 regressions] regressions on arm after r12-5301
  2021-11-17  8:45 [Bug tree-optimization/103298] New: [12 regressions] regressions on arm after r12-5301 clyon at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2022-05-06  8:31 ` jakub at gcc dot gnu.org
@ 2023-05-08 12:23 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-05-08 12:23 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|12.3                        |12.4

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 12.3 is being released, retargeting bugs to GCC 12.4.

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

end of thread, other threads:[~2023-05-08 12:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-17  8:45 [Bug tree-optimization/103298] New: [12 regressions] regressions on arm after r12-5301 clyon at gcc dot gnu.org
2021-11-17  8:49 ` [Bug tree-optimization/103298] " pinskia at gcc dot gnu.org
2021-11-17 21:38 ` pinskia at gcc dot gnu.org
2021-11-18  7:44 ` rguenth at gcc dot gnu.org
2021-11-18  9:38 ` [Bug testsuite/103298] " rguenth at gcc dot gnu.org
2021-11-18 11:36 ` rearnsha at gcc dot gnu.org
2022-05-06  8:31 ` jakub at gcc dot gnu.org
2023-05-08 12:23 ` rguenth 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).