public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/94516] New: [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793
@ 2020-04-07 11:52 marxin at gcc dot gnu.org
  2020-04-07 11:54 ` [Bug rtl-optimization/94516] " marxin at gcc dot gnu.org
                   ` (24 more replies)
  0 siblings, 25 replies; 26+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-04-07 11:52 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94516
           Summary: [10 Regression] gnutls test ./psk-file fails since
                    r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: jakub at gcc dot gnu.org
  Target Milestone: ---

The following release:
https://www.gnupg.org/ftp/gcrypt/gnutls/v3.6/gnutls-3.6.12.tar.xz

fails with:
$ export CFLAGS="-O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong
-funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection
-Werror=return-type -g -fPIE"
$ ./configure
$ make
$ cd tests
$ make check
$ valgrind ./psk-file 
==22044== Memcheck, a memory error detector
==22044== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==22044== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==22044== Command: ./psk-file
==22044== 
ntest NORMAL:-KX-ALL:+PSK (user:non-hex)
==22045== 
==22045== HEAP SUMMARY:
==22045==     in use at exit: 337 bytes in 7 blocks
==22045==   total heap usage: 1,371 allocs, 1,364 frees, 203,699 bytes
allocated
==22045== 
==22045== LEAK SUMMARY:
==22045==    definitely lost: 0 bytes in 0 blocks
==22045==    indirectly lost: 0 bytes in 0 blocks
==22045==      possibly lost: 0 bytes in 0 blocks
==22045==    still reachable: 337 bytes in 7 blocks
==22045==         suppressed: 0 bytes in 0 blocks
==22045== Rerun with --leak-check=full to see details of leaked memory
==22045== 
==22045== For lists of detected and suppressed errors, rerun with: -s
==22045== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
test
NORMAL:-VERS-ALL:+VERS-TLS1.3:-CIPHER-ALL:+AES-128-GCM:+DHE-PSK:+PSK:-GROUP-DH-ALL
(user:jas)
==22046== 
==22046== Process terminating with default action of signal 11 (SIGSEGV):
dumping core
==22046==  General Protection Fault
==22046==    at 0x48D291A: UnknownInlinedFun (pk.c:1925)
==22046==    by 0x48D291A: wrap_nettle_pk_generate_keys.lto_priv.0 (pk.c:2509)
==22046==    by 0x48F53FB: client_gen_key_share (key_share.c:95)
==22046==    by 0x48F59CC: key_share_send_params.lto_priv.0 (key_share.c:725)
==22046==    by 0x4998F6B: hello_ext_send (hello_ext.c:368)
==22046==    by 0x49660D5: UnknownInlinedFun (extv.c:218)
==22046==    by 0x49660D5: _gnutls_extv_append (extv.c:200)
==22046==    by 0x4999301: _gnutls_gen_hello_extensions (hello_ext.c:436)
==22046==    by 0x49B2731: UnknownInlinedFun (handshake.c:2265)
==22046==    by 0x49B2731: UnknownInlinedFun (handshake.c:2895)
==22046==    by 0x49B2731: gnutls_handshake (handshake.c:2727)
==22046==    by 0x402C1F: client (psk-file.c:102)
==22046==    by 0x4030B3: run_test3 (psk-file.c:349)
==22046==    by 0x4031FE: run_test2 (psk-file.c:358)
==22046==    by 0x4031FE: doit (psk-file.c:407)

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

* [Bug rtl-optimization/94516] [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793
  2020-04-07 11:52 [Bug rtl-optimization/94516] New: [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793 marxin at gcc dot gnu.org
@ 2020-04-07 11:54 ` marxin at gcc dot gnu.org
  2020-04-07 11:58 ` marxin at gcc dot gnu.org
                   ` (23 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-04-07 11:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Created attachment 48227
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48227&action=edit
Reducing patch for psk-file.c

I tried both ASAN and UBSAN, and also valgrind with -O0 and it seems all fine.

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

* [Bug rtl-optimization/94516] [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793
  2020-04-07 11:52 [Bug rtl-optimization/94516] New: [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793 marxin at gcc dot gnu.org
  2020-04-07 11:54 ` [Bug rtl-optimization/94516] " marxin at gcc dot gnu.org
@ 2020-04-07 11:58 ` marxin at gcc dot gnu.org
  2020-04-07 12:01 ` rguenth at gcc dot gnu.org
                   ` (22 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-04-07 11:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Created attachment 48228
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48228&action=edit
pre-processed source file

It's compiled with:

$ gcc -fdiagnostics-show-option  -O2 -Wall -D_FORTIFY_SOURCE=2
-fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables
-fstack-clash-protection -Werror=return-type -g -fPIE -MT psk-file.o psk-file.i
-c

The assembly diff is quite small (it's doit function):

$ diff -u /tmp/psk-file.good.s /tmp/psk-file.bad.s 
--- /tmp/psk-file.good.s        2020-04-07 13:40:35.985428368 +0200
+++ /tmp/psk-file.bad.s 2020-04-07 13:38:27.658722637 +0200
@@ -1036,37 +1036,33 @@
        pushq   $0
        .cfi_def_cfa_offset 80
        call    run_test3
-       addq    $24, %rsp
-       .cfi_def_cfa_offset 56
+       pushq   $0
+       .cfi_def_cfa_offset 64
        xorl    %r9d, %r9d
        xorl    %r8d, %r8d
        pushq   $0
-       .cfi_def_cfa_offset 64
+       .cfi_def_cfa_offset 72
        movq    %r12, %rcx
        leaq    .LC42(%rip), %rdx
        leaq    .LC43(%rip), %rsi
-       pushq   $0
-       .cfi_def_cfa_offset 72
-       leaq    .LC44(%rip), %rdi
        pushq   $9
        .cfi_def_cfa_offset 80
+       leaq    .LC44(%rip), %rdi
        call    run_test3
-       addq    $24, %rsp
-       .cfi_def_cfa_offset 56
-       xorl    %r9d, %r9d
-       movq    %r12, %rcx
        pushq   $-32
        .cfi_def_cfa_offset 64
+       xorl    %r9d, %r9d
        movl    $1, %r8d
-       leaq    .LC42(%rip), %rdx
-       xorl    %esi, %esi
        pushq   $-12
        .cfi_def_cfa_offset 72
-       leaq    .LC45(%rip), %rdi
+       movq    %r12, %rcx
+       leaq    .LC42(%rip), %rdx
+       xorl    %esi, %esi
        pushq   $0
        .cfi_def_cfa_offset 80
+       leaq    .LC45(%rip), %rdi
        call    run_test3
-       addq    $32, %rsp
+       movq    %r12, %rsp
        .cfi_def_cfa_offset 48
        movq    24(%rsp), %rax
        subq    %fs:40, %rax

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

* [Bug rtl-optimization/94516] [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793
  2020-04-07 11:52 [Bug rtl-optimization/94516] New: [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793 marxin at gcc dot gnu.org
  2020-04-07 11:54 ` [Bug rtl-optimization/94516] " marxin at gcc dot gnu.org
  2020-04-07 11:58 ` marxin at gcc dot gnu.org
@ 2020-04-07 12:01 ` rguenth at gcc dot gnu.org
  2020-04-07 12:45 ` jakub at gcc dot gnu.org
                   ` (21 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-04-07 12:01 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |10.0

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

* [Bug rtl-optimization/94516] [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793
  2020-04-07 11:52 [Bug rtl-optimization/94516] New: [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793 marxin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-04-07 12:01 ` rguenth at gcc dot gnu.org
@ 2020-04-07 12:45 ` jakub at gcc dot gnu.org
  2020-04-07 12:45 ` jakub at gcc dot gnu.org
                   ` (20 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-04-07 12:45 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2020-04-07
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The problem is during postreload-gcse.c, which changed:
@@ -4749,23 +4758,7 @@ Dataflow summary:
                     (expr_list:SI (use (reg:SI 36 r8))
                         (expr_list:SI (use (reg:SI 37 r9))
                             (nil))))))))
-(insn 22 21 24 2 (parallel [
-            (set (reg/f:DI 7 sp)
-                (plus:DI (reg/f:DI 7 sp)
-                    (const_int 32 [0x20])))
-            (clobber (reg:CC 17 flags))
-        ]) "pr94516.c":6747:2 186 {*adddi_1}
-     (expr_list:REG_ARGS_SIZE (const_int 0 [0])
-        (nil)))
-(insn 24 22 25 2 (parallel [
-            (set (reg/f:DI 7 sp)
-                (plus:DI (reg/f:DI 7 sp)
-                    (const_int -8 [0xfffffffffffffff8])))
-            (clobber (reg:CC 17 flags))
-        ]) "pr94516.c":6747:2 186 {*adddi_1}
-     (expr_list:REG_ARGS_SIZE (const_int 8 [0x8])
-        (nil)))
-(insn 25 24 26 2 (set (mem:SI (pre_modify:DI (reg/f:DI 7 sp)
+(insn 25 21 26 2 (set (mem:SI (pre_modify:DI (reg/f:DI 7 sp)
                 (plus:DI (reg/f:DI 7 sp)
                     (const_int -8 [0xfffffffffffffff8]))) [3  S4 A32])
         (const_int 0 [0])) "pr94516.c":6747:2 46 {*pushsi2_rex64}
...
@@ -4815,23 +4808,7 @@ Dataflow summary:
                     (expr_list:SI (use (reg:SI 36 r8))
                         (expr_list:SI (use (reg:SI 37 r9))
                             (nil))))))))
-(insn 35 34 37 2 (parallel [
-            (set (reg/f:DI 7 sp)
-                (plus:DI (reg/f:DI 7 sp)
-                    (const_int 32 [0x20])))
-            (clobber (reg:CC 17 flags))
-        ]) "pr94516.c":6780:2 186 {*adddi_1}
-     (expr_list:REG_ARGS_SIZE (const_int 0 [0])
-        (nil)))
-(insn 37 35 38 2 (parallel [
-            (set (reg/f:DI 7 sp)
-                (plus:DI (reg/f:DI 7 sp)
-                    (const_int -8 [0xfffffffffffffff8])))
-            (clobber (reg:CC 17 flags))
-        ]) "pr94516.c":6780:2 186 {*adddi_1}
-     (expr_list:REG_ARGS_SIZE (const_int 8 [0x8])
-        (nil)))
-(insn 38 37 39 2 (set (mem:SI (pre_modify:DI (reg/f:DI 7 sp)
+(insn 38 34 39 2 (set (mem:SI (pre_modify:DI (reg/f:DI 7 sp)
                 (plus:DI (reg/f:DI 7 sp)
                     (const_int -8 [0xfffffffffffffff8]))) [3  S4 A32])
         (const_int -32 [0xffffffffffffffe0])) "pr94516.c":6780:2 46
{*pushsi2_rex64}
...
@@ -4881,12 +4858,8 @@ Dataflow summary:
                     (expr_list:SI (use (reg:SI 36 r8))
                         (expr_list:SI (use (reg:SI 37 r9))
                             (nil))))))))
-(insn 48 47 51 2 (parallel [
-            (set (reg/f:DI 7 sp)
-                (plus:DI (reg/f:DI 7 sp)
-                    (const_int 32 [0x20])))
-            (clobber (reg:CC 17 flags))
-        ]) "pr94516.c":6783:1 186 {*adddi_1}
+(insn 48 47 51 2 (set (reg/f:DI 7 sp)
+        (reg/f:DI 40 r12 [84])) "pr94516.c":6783:1 66 {*movdi_internal}
      (expr_list:REG_ARGS_SIZE (const_int 0 [0])
         (nil)))
 (insn 51 48 52 2 (parallel [

because cselib now provides the sp based equalities it didn't before.
I believe the final value of sp is correct, there is r12 = rsp assignment in
the prologue, but the problem is that by throwing away the intermediate sp
adjustments in the calls in between the stack is misaligned.

We have the csa pass for combining stack adjustments, perhaps postreload-gcse
should just refrain from adjusting the stack pointer adjustments?

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

* [Bug rtl-optimization/94516] [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793
  2020-04-07 11:52 [Bug rtl-optimization/94516] New: [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793 marxin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2020-04-07 12:45 ` jakub at gcc dot gnu.org
@ 2020-04-07 12:45 ` jakub at gcc dot gnu.org
  2020-04-07 13:30 ` jakub at gcc dot gnu.org
                   ` (19 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-04-07 12:45 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1

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

* [Bug rtl-optimization/94516] [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793
  2020-04-07 11:52 [Bug rtl-optimization/94516] New: [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793 marxin at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2020-04-07 12:45 ` jakub at gcc dot gnu.org
@ 2020-04-07 13:30 ` jakub at gcc dot gnu.org
  2020-04-07 14:28 ` jakub at gcc dot gnu.org
                   ` (18 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-04-07 13:30 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |law at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
So, I see there actually two separate undesirable changes.  One is that during
reload_cse_regs_1 because of the cselib.c changes it optimized 3 times:
-(insn 22 21 24 2 (parallel [
-            (set (reg/f:DI 7 sp)
-                (plus:DI (reg/f:DI 7 sp)
-                    (const_int 32 [0x20])))
-            (clobber (reg:CC 17 flags))
-        ]) "pr94516.c":6747:2 186 {*adddi_1}
-     (expr_list:REG_ARGS_SIZE (const_int 0 [0])
-        (nil)))
+(insn 22 21 24 2 (parallel [
+            (set (reg/f:DI 7 sp)
+                (reg/f:DI 40 r12 [84]))
+        ]) "pr94516.c":6747:2 66 {*movdi_internal}
+     (expr_list:REG_ARGS_SIZE (const_int 0 [0])
+        (nil)))
That in itself isn't a wrong-code change, the question is if it is actually
beneficial (maybe for -Os it could).
The second change happens in the reload_cse_move2add
              /* Try to transform (set (REGX) (REGY))
                                  (set (REGX) (PLUS (REGX) (CONST_INT A)))
                                  ...
                                  (set (REGX) (REGY))
                                  (set (REGX) (PLUS (REGX) (CONST_INT B)))
                 to
                                  (set (REGX) (REGY))
                                  (set (REGX) (PLUS (REGX) (CONST_INT A)))
                                  ...
                                  (set (REGX) (plus (REGX) (CONST_INT B-A))) 
*/
transformation, where REGX is sp and REGY is this r12 register that happens to
contain a copy of rsp with REG_ARGS_SIZE of 0 and this one is the wrong-code
one, because it ignores the fact that REGX is used in various other
instructions in between.

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

* [Bug rtl-optimization/94516] [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793
  2020-04-07 11:52 [Bug rtl-optimization/94516] New: [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793 marxin at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2020-04-07 13:30 ` jakub at gcc dot gnu.org
@ 2020-04-07 14:28 ` jakub at gcc dot gnu.org
  2020-04-07 14:35 ` marxin at gcc dot gnu.org
                   ` (17 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-04-07 14:28 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 48230
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48230&action=edit
gcc10-pr94516.patch

Untested flag to fix the wrong-code issue.  The problem was that
move2add_note_store didn't handle PRE_MODIFY and POST_MODIFY, but it also
seemed misplaced to me, because autoinc doesn't have to appear in a MEM that is
stored into, could be also in a MEM that is read from (pop).

This doesn't disable the sp += 32; sp -= 8; to sp = r12; sp -= 8;
transformation which correct from correctness POV, but actually isn't really
beneficial even from size POV, because the csa pass later on optimizes sp +=
32; sp -= 8; into sp += 24;, but the latter can't be optimized that way.

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

* [Bug rtl-optimization/94516] [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793
  2020-04-07 11:52 [Bug rtl-optimization/94516] New: [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793 marxin at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2020-04-07 14:28 ` jakub at gcc dot gnu.org
@ 2020-04-07 14:35 ` marxin at gcc dot gnu.org
  2020-04-07 14:55 ` jakub at gcc dot gnu.org
                   ` (16 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-04-07 14:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #5)
> Created attachment 48230 [details]
> gcc10-pr94516.patch
> 

I can confirm the patch fixes the gnutls. Would you be able to come up with a
test-case?

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

* [Bug rtl-optimization/94516] [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793
  2020-04-07 11:52 [Bug rtl-optimization/94516] New: [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793 marxin at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2020-04-07 14:35 ` marxin at gcc dot gnu.org
@ 2020-04-07 14:55 ` jakub at gcc dot gnu.org
  2020-04-07 15:05 ` marxin at gcc dot gnu.org
                   ` (15 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-04-07 14:55 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #48230|0                           |1
        is obsolete|                            |

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 48231
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48231&action=edit
gcc10-pr94516.patch

Sure, here it is with a testcase.

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

* [Bug rtl-optimization/94516] [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793
  2020-04-07 11:52 [Bug rtl-optimization/94516] New: [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793 marxin at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2020-04-07 14:55 ` jakub at gcc dot gnu.org
@ 2020-04-07 15:05 ` marxin at gcc dot gnu.org
  2020-04-07 15:13 ` jakub at gcc dot gnu.org
                   ` (14 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-04-07 15:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #7)
> Created attachment 48231 [details]
> gcc10-pr94516.patch
> 
> Sure, here it is with a testcase.

Great job!

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

* [Bug rtl-optimization/94516] [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793
  2020-04-07 11:52 [Bug rtl-optimization/94516] New: [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793 marxin at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2020-04-07 15:05 ` marxin at gcc dot gnu.org
@ 2020-04-07 15:13 ` jakub at gcc dot gnu.org
  2020-04-08 10:05 ` cvs-commit at gcc dot gnu.org
                   ` (13 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-04-07 15:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
For the optimization issue, we could have a hack like:
--- gcc/postreload.c.jj 2020-04-07 16:54:23.638924247 +0200
+++ gcc/postreload.c    2020-04-07 17:06:44.055964581 +0200
@@ -328,6 +328,17 @@ reload_cse_simplify_set (rtx set, rtx_in
       else
        continue;

+      /* Prefer stack pointer adjustment over copies from a register
+        that happens to hold the right value already (unless it is
+        much higher cost), because in the sp += const case the
+        pass_stack_adjustments pass can merge it with other stack
+        adjustments.  */
+      if (SET_DEST (set) == stack_pointer_rtx
+         && GET_CODE (SET_SRC (set)) == PLUS
+         && XEXP (SET_SRC (set), 0) == stack_pointer_rtx
+         && CONST_INT_P (XEXP (SET_SRC (set), 1)))
+       this_cost *= 4;
+
       /* If equal costs, prefer registers over anything else.  That
         tends to lead to smaller instructions on some machines.  */
       if (this_cost < old_cost

Dunno... :(
Or do such a change only if there are no following sp adjustments that could be
combined with it (e.g. remember we've done such a change, and when we process
next stack pointer adjustment with no sp uses in between or what exactly csa
does, and don't manage to optimize that one into sp = reg, try to undo the
previous change.

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

* [Bug rtl-optimization/94516] [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793
  2020-04-07 11:52 [Bug rtl-optimization/94516] New: [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793 marxin at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2020-04-07 15:13 ` jakub at gcc dot gnu.org
@ 2020-04-08 10:05 ` cvs-commit at gcc dot gnu.org
  2020-04-08 19:29 ` jakub at gcc dot gnu.org
                   ` (12 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-04-08 10:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:70b55b25aa14b60f0e0f0193f7178bae756076ad

commit r10-7617-g70b55b25aa14b60f0e0f0193f7178bae756076ad
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Wed Apr 8 12:04:46 2020 +0200

    postreload: Fix autoinc handling in reload_cse_move2add [PR94516]

    The following testcase shows two separate issues caused by the cselib
    changes.
    One is that through the cselib sp tracking improvements on
    ... r12 = rsp; rsp -= 8; push cst1; push cst2; push cst3; call
    rsp += 32; rsp -= 8; push cst4; push cst5; push cst6; call
    rsp += 32; rsp -= 8; push cst7; push cst8; push cst9; call
    rsp += 32
    reload_cse_simplify_set decides to optimize the rsp += 32 insns
    into rsp = r12 because cselib figures that the r12 register holds the right
    value.  From the pure cost perspective that seems like a win and on its own
    at least for -Os that would be beneficial, except that there are those
    rsp -= 8 stack adjustments after it, where rsp += 32; rsp -= 8; is
optimized
    into rsp += 24; by the csa pass, but rsp = r12; rsp -= 8 can't.  Dunno
    what to do about this part, the PR has a hack in a comment.

    Anyway, the following patch fixes the other part, which isn't a missed
    optimization, but a wrong-code issue.  The problem is that the pushes of
    constant are on x86 represented through PRE_MODIFY and while
    move2add_note_store has some code to handle {PRE,POST}_{INC,DEC} without
    REG_INC note, it doesn't handle {PRE,POST}_MODIFY (that would be enough
    to fix this testcase).  But additionally it looks misplaced, because
    move2add_note_store is only called on the rtxes that are stored into,
    while RTX_AUTOINC can happen not just in those, but anywhere else in the
    instruction (e.g. pop insn can have autoinc in the SET_SRC MEM).
    REG_INC note seems to be required for any autoinc except for stack pointer
    autoinc which doesn't have those notes, so this patch just handles
    the sp autoinc after the REG_INC note handling loop.

    2020-04-08  Jakub Jelinek  <jakub@redhat.com>

            PR rtl-optimization/94516
            * postreload.c: Include rtl-iter.h.
            (reload_cse_move2add): Handle SP autoinc here by
FOR_EACH_SUBRTX_VAR
            looking for all MEMs with RTX_AUTOINC operand.
            (move2add_note_store): Remove {PRE,POST}_{INC,DEC} handling.

            * gcc.dg/torture/pr94516.c: New test.

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

* [Bug rtl-optimization/94516] [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793
  2020-04-07 11:52 [Bug rtl-optimization/94516] New: [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793 marxin at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2020-04-08 10:05 ` cvs-commit at gcc dot gnu.org
@ 2020-04-08 19:29 ` jakub at gcc dot gnu.org
  2020-04-08 20:02 ` law at redhat dot com
                   ` (11 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-04-08 19:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The wrong-code issue is now fixed, keeping open for the missed-optimization
part.

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

* [Bug rtl-optimization/94516] [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793
  2020-04-07 11:52 [Bug rtl-optimization/94516] New: [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793 marxin at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2020-04-08 19:29 ` jakub at gcc dot gnu.org
@ 2020-04-08 20:02 ` law at redhat dot com
  2020-04-09 13:12 ` jakub at gcc dot gnu.org
                   ` (10 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: law at redhat dot com @ 2020-04-08 20:02 UTC (permalink / raw)
  To: gcc-bugs

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

Jeffrey A. Law <law at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P2
                 CC|                            |law at redhat dot com

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

* [Bug rtl-optimization/94516] [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793
  2020-04-07 11:52 [Bug rtl-optimization/94516] New: [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793 marxin at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  2020-04-08 20:02 ` law at redhat dot com
@ 2020-04-09 13:12 ` jakub at gcc dot gnu.org
  2020-04-15  9:44 ` jakub at gcc dot gnu.org
                   ` (9 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-04-09 13:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Wonder if we couldn't let postreload.c add REG_EQUAL notes when it replaces sp
+= CONST_INT with sp = reg, like:
--- gcc/postreload.c.jj 2020-04-08 12:03:54.600398023 +0200
+++ gcc/postreload.c    2020-04-09 14:36:48.288632884 +0200
@@ -97,6 +97,16 @@ reload_cse_simplify (rtx_insn *insn, rtx
   if (NO_FUNCTION_CSE && CALL_P (insn))
     return false;

+  /* Remember if this insn has been sp += const_int.  */
+  rtx sp_set = set_for_reg_notes (insn);
+  rtx sp_addend = NULL_RTX;
+  if (sp_set
+      && SET_DEST (sp_set) == stack_pointer_rtx
+      && GET_CODE (SET_SRC (sp_set)) == PLUS
+      && XEXP (SET_SRC (sp_set), 0) == stack_pointer_rtx
+      && CONST_INT_P (XEXP (SET_SRC (sp_set), 1)))
+    sp_addend = XEXP (SET_SRC (sp_set), 1);
+
   if (GET_CODE (body) == SET)
     {
       int count = 0;
@@ -180,6 +190,15 @@ reload_cse_simplify (rtx_insn *insn, rtx
        reload_cse_simplify_operands (insn, testreg);
     }

+  /* If sp += const_int insn is changed into sp = reg;, add REG_EQUAL
+     note so that the stack_adjustments pass can undo it if beneficial.  */
+  if (sp_addend
+      && SET_DEST (sp_set) == stack_pointer_rtx
+      && GET_CODE (SET_SRC (sp_set)) != PLUS)
+    set_dst_reg_note (insn, REG_EQUAL,
+                     gen_rtx_PLUS (Pmode, stack_pointer_rtx,
+                                   sp_addend), stack_pointer_rtx);
+
 done:
   return (EDGE_COUNT (insn_bb->succs) != insn_bb_succs);
 }
and teach combine-stack-adj.c to deal with that.
I guess the major problem is that e.g. on x86 sp += const_int has a CC clobber,
but sp = reg doesn't.  And post-RA not really sure how can one figure out what
clobbers to readd and how to check whether it is safe (the reg is dead).
Perhaps the clobbers could be taken from the other stack adjustment insn, but
still we need to verify the register(s) aren't live there.

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

* [Bug rtl-optimization/94516] [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793
  2020-04-07 11:52 [Bug rtl-optimization/94516] New: [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793 marxin at gcc dot gnu.org
                   ` (14 preceding siblings ...)
  2020-04-09 13:12 ` jakub at gcc dot gnu.org
@ 2020-04-15  9:44 ` jakub at gcc dot gnu.org
  2020-04-20 13:05 ` jakub at gcc dot gnu.org
                   ` (8 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-04-15  9:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I've gathered statistics across x86_64-linux and i686-linux bootstraps/regtests
in postreload.c (reload_cse_simplify_set) when sp = sp + const_int is replaced
with sp = reg, once with the recent cselib.c/var-tracking.c changes reverted
and once with vanilla trunk.
It triggered on -m32 / -m64 code with old cselib.c 1559 / 68 times and with new
cselib.c 8476 / 453 times.  So, it was happening before too and I'll try to
check some cases if it also doesn't prevent csa, but now happens 5-7 times more
often.

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

* [Bug rtl-optimization/94516] [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793
  2020-04-07 11:52 [Bug rtl-optimization/94516] New: [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793 marxin at gcc dot gnu.org
                   ` (15 preceding siblings ...)
  2020-04-15  9:44 ` jakub at gcc dot gnu.org
@ 2020-04-20 13:05 ` jakub at gcc dot gnu.org
  2020-05-05 14:36 ` [Bug rtl-optimization/94516] [10/11 " cvs-commit at gcc dot gnu.org
                   ` (7 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-04-20 13:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 48312
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48312&action=edit
gcc10-pr94516.patch

Untested patch for the missed-optimization part, with this we get the same
assembly like gcc 9 back for -O2 -fpie.

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

* [Bug rtl-optimization/94516] [10/11 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793
  2020-04-07 11:52 [Bug rtl-optimization/94516] New: [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793 marxin at gcc dot gnu.org
                   ` (16 preceding siblings ...)
  2020-04-20 13:05 ` jakub at gcc dot gnu.org
@ 2020-05-05 14:36 ` cvs-commit at gcc dot gnu.org
  2020-05-05 14:41 ` [Bug rtl-optimization/94516] [10 " jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-05-05 14:36 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:d44f14ccef831d90feb57fab56bc3389d543ffdd

commit r11-87-gd44f14ccef831d90feb57fab56bc3389d543ffdd
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Tue May 5 16:34:51 2020 +0200

    csa, postreload: Improve csa after recent cselib changes [PR94516]

    This patch addresses a missed optimization caused by the cselib changes.
    Already in the past postreload could replace sp = sp + const_int with
    sp = regxy if regxy already has the right value, but with the cselib
    changes it happens several times more often.  It can result in smaller
    code, so it seems undesirable to prevent such optimizations, but
    unfortunately it can get into the way of stack adjustment coalescing,
    where e.g. if we used to have sp = sp + 32; sp = sp - 8;, previously
    we'd turn that into sp = sp + 24;, but now postreload optimizes
    into sp = r12; sp = sp - 8; and csa gives up.

    The patch just adds a REG_EQUAL note when changing sp = sp + const into
    sp = reg, where we remember it was actually a stack adjustment by certain
    constant, and the combine-stack-adj changes than make use of those
REG_EQUAL
    notes, together with LR tracking (csa did enable the note problem, just
    didn't simulate each insn) so that we can add the needed clobbers etc.
    (taken from the other stack adjustment insn).

    2020-05-05  Jakub Jelinek  <jakub@redhat.com>

            PR rtl-optimization/94516
            * postreload.c (reload_cse_simplify): When replacing sp = sp +
const
            with sp = reg, add REG_EQUAL note with sp + const.
            * combine-stack-adj.c (try_apply_stack_adjustment): Change return
            type from int to bool.  Add LIVE and OTHER_INSN arguments.  Undo
            postreload sp = sp + const to sp = reg optimization if needed and
            possible.
            (combine_stack_adjustments_for_block): Add LIVE argument.  Handle
            reg = sp insn with sp + const REG_EQUAL note.  Adjust
            try_apply_stack_adjustment caller, call
            df_simulate_initialize_forwards and df_simulate_one_insn_forwards.
            (combine_stack_adjustments): Allocate and free LIVE bitmap,
            adjust combine_stack_adjustments_for_block caller.

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

* [Bug rtl-optimization/94516] [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793
  2020-04-07 11:52 [Bug rtl-optimization/94516] New: [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793 marxin at gcc dot gnu.org
                   ` (17 preceding siblings ...)
  2020-05-05 14:36 ` [Bug rtl-optimization/94516] [10/11 " cvs-commit at gcc dot gnu.org
@ 2020-05-05 14:41 ` jakub at gcc dot gnu.org
  2020-05-07 11:56 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-05-05 14:41 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[10/11 Regression] gnutls   |[10 Regression] gnutls test
                   |test ./psk-file fails since |./psk-file fails since
                   |r10-7515-g2c0fa3ecf70d199af |r10-7515-g2c0fa3ecf70d199af
                   |18785702e9e0548fd3ab793     |18785702e9e0548fd3ab793

--- Comment #16 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Should be fixed on the trunk now, unsure about backporting yet, time will tell.

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

* [Bug rtl-optimization/94516] [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793
  2020-04-07 11:52 [Bug rtl-optimization/94516] New: [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793 marxin at gcc dot gnu.org
                   ` (18 preceding siblings ...)
  2020-05-05 14:41 ` [Bug rtl-optimization/94516] [10 " jakub at gcc dot gnu.org
@ 2020-05-07 11:56 ` jakub at gcc dot gnu.org
  2020-05-08  7:31 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-05-07 11:56 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.0                        |10.2

--- Comment #17 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.1 has been released.

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

* [Bug rtl-optimization/94516] [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793
  2020-04-07 11:52 [Bug rtl-optimization/94516] New: [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793 marxin at gcc dot gnu.org
                   ` (19 preceding siblings ...)
  2020-05-07 11:56 ` jakub at gcc dot gnu.org
@ 2020-05-08  7:31 ` cvs-commit at gcc dot gnu.org
  2020-07-23  6:51 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-05-08  7:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #18 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:af1634f1b555004753a22d1124dbb8419ee095cb

commit r11-192-gaf1634f1b555004753a22d1124dbb8419ee095cb
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri May 8 09:30:54 2020 +0200

    csa: Fix --enable-checking=yes,df bootstrap failure in csa [PR94961]

    My recent combine-stack-adj.c change broke df checking bootstrap,
    while most of the changes are done through validate_change/confirm_changes
    which update df info, the removal of REG_EQUAL notes didn't update df info.

    2020-05-08  Jakub Jelinek  <jakub@redhat.com>

            PR bootstrap/94961
            PR rtl-optimization/94516
            * rtl.h (remove_reg_equal_equiv_notes): Add a bool argument
defaulted
            to false.
            * rtlanal.c (remove_reg_equal_equiv_notes): Add no_rescan argument.
            Call df_notes_rescan if that argument is not true and returning
true.
            * combine.c (adjust_for_new_dest): Pass true as second argument to
            remove_reg_equal_equiv_notes.
            * postreload.c (reload_combine_recognize_pattern): Don't call
            df_notes_rescan.

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

* [Bug rtl-optimization/94516] [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793
  2020-04-07 11:52 [Bug rtl-optimization/94516] New: [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793 marxin at gcc dot gnu.org
                   ` (20 preceding siblings ...)
  2020-05-08  7:31 ` cvs-commit at gcc dot gnu.org
@ 2020-07-23  6:51 ` rguenth at gcc dot gnu.org
  2021-04-08 12:02 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-07-23  6:51 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.2                        |10.3

--- Comment #19 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10.2 is released, adjusting target milestone.

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

* [Bug rtl-optimization/94516] [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793
  2020-04-07 11:52 [Bug rtl-optimization/94516] New: [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793 marxin at gcc dot gnu.org
                   ` (21 preceding siblings ...)
  2020-07-23  6:51 ` rguenth at gcc dot gnu.org
@ 2021-04-08 12:02 ` rguenth at gcc dot gnu.org
  2022-06-28 10:40 ` jakub at gcc dot gnu.org
  2023-07-07  8:48 ` rguenth at gcc dot gnu.org
  24 siblings, 0 replies; 26+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-04-08 12:02 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.3                        |10.4

--- Comment #20 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10.3 is being released, retargeting bugs to GCC 10.4.

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

* [Bug rtl-optimization/94516] [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793
  2020-04-07 11:52 [Bug rtl-optimization/94516] New: [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793 marxin at gcc dot gnu.org
                   ` (22 preceding siblings ...)
  2021-04-08 12:02 ` rguenth at gcc dot gnu.org
@ 2022-06-28 10:40 ` jakub at gcc dot gnu.org
  2023-07-07  8:48 ` rguenth at gcc dot gnu.org
  24 siblings, 0 replies; 26+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:40 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.4                        |10.5

--- Comment #21 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.

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

* [Bug rtl-optimization/94516] [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793
  2020-04-07 11:52 [Bug rtl-optimization/94516] New: [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793 marxin at gcc dot gnu.org
                   ` (23 preceding siblings ...)
  2022-06-28 10:40 ` jakub at gcc dot gnu.org
@ 2023-07-07  8:48 ` rguenth at gcc dot gnu.org
  24 siblings, 0 replies; 26+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07  8:48 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|10.5                        |11.0
      Known to fail|                            |10.5.0

--- Comment #22 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed fully for GCC 11.

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

end of thread, other threads:[~2023-07-07  8:48 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-07 11:52 [Bug rtl-optimization/94516] New: [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793 marxin at gcc dot gnu.org
2020-04-07 11:54 ` [Bug rtl-optimization/94516] " marxin at gcc dot gnu.org
2020-04-07 11:58 ` marxin at gcc dot gnu.org
2020-04-07 12:01 ` rguenth at gcc dot gnu.org
2020-04-07 12:45 ` jakub at gcc dot gnu.org
2020-04-07 12:45 ` jakub at gcc dot gnu.org
2020-04-07 13:30 ` jakub at gcc dot gnu.org
2020-04-07 14:28 ` jakub at gcc dot gnu.org
2020-04-07 14:35 ` marxin at gcc dot gnu.org
2020-04-07 14:55 ` jakub at gcc dot gnu.org
2020-04-07 15:05 ` marxin at gcc dot gnu.org
2020-04-07 15:13 ` jakub at gcc dot gnu.org
2020-04-08 10:05 ` cvs-commit at gcc dot gnu.org
2020-04-08 19:29 ` jakub at gcc dot gnu.org
2020-04-08 20:02 ` law at redhat dot com
2020-04-09 13:12 ` jakub at gcc dot gnu.org
2020-04-15  9:44 ` jakub at gcc dot gnu.org
2020-04-20 13:05 ` jakub at gcc dot gnu.org
2020-05-05 14:36 ` [Bug rtl-optimization/94516] [10/11 " cvs-commit at gcc dot gnu.org
2020-05-05 14:41 ` [Bug rtl-optimization/94516] [10 " jakub at gcc dot gnu.org
2020-05-07 11:56 ` jakub at gcc dot gnu.org
2020-05-08  7:31 ` cvs-commit at gcc dot gnu.org
2020-07-23  6:51 ` rguenth at gcc dot gnu.org
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
2022-06-28 10:40 ` jakub at gcc dot gnu.org
2023-07-07  8:48 ` 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).