[Bug rtl-optimization/115568] [12/13/14 Regression] wrong code at -O2 with "-fno-tree-sink -fno-tree-ter -fschedule-insns" on x86_64-linux-gnu since r12-6122-g9407058a430316

2025-04-13 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115568

Uroš Bizjak  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #17 from Uroš Bizjak  ---
Fixed everywhere.

[Bug rtl-optimization/115568] [12/13/14 Regression] wrong code at -O2 with "-fno-tree-sink -fno-tree-ter -fschedule-insns" on x86_64-linux-gnu since r12-6122-g9407058a430316

2025-04-13 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115568

--- Comment #16 from GCC Commits  ---
The releases/gcc-12 branch has been updated by Uros Bizjak :

https://gcc.gnu.org/g:6675cf3abd09731ec8360ba8ac8928b63b33b7bb

commit r12-11035-g6675cf3abd09731ec8360ba8ac8928b63b33b7bb
Author: Richard Biener 
Date:   Wed Apr 9 14:36:19 2025 +0200

rtl-optimization/119689 - compare-debug failure with LRA

The previous change to fix LRA rematerialization broke compare-debug
for i586 bootstrap.  Fixed by using prev_nonnote_nondebug_insn
instead of prev_nonnote_insn.

PR rtl-optimization/119689
PR rtl-optimization/115568
* lra-remat.cc (create_cands): Use prev_nonnote_nondebug_insn
to check whether insn2 is directly before insn.

* g++.target/i386/pr119689.C: New testcase.

(cherry picked from commit 07de7717a22b1503760e9b79dfbe22a0f428)

[Bug rtl-optimization/115568] [12/13/14 Regression] wrong code at -O2 with "-fno-tree-sink -fno-tree-ter -fschedule-insns" on x86_64-linux-gnu since r12-6122-g9407058a430316

2025-04-13 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115568

--- Comment #15 from GCC Commits  ---
The releases/gcc-12 branch has been updated by Uros Bizjak :

https://gcc.gnu.org/g:3232e151654f3998926c8e82a2ffd911c6e74df4

commit r12-11034-g3232e151654f3998926c8e82a2ffd911c6e74df4
Author: Vladimir N. Makarov 
Date:   Wed Feb 5 14:23:23 2025 -0500

[PR115568][LRA]: Use more strict output reload check in rematerialization

  In this PR case LRA rematerialized a value from inheritance insn
instead of output reload one.  This resulted in considering a
rematerilization candidate value available when it was actually
not.  As a consequence an insn after rematerliazation used the
unexpected value and this use resulted in fp exception.  The patch
fixes this bug.

gcc/ChangeLog:

PR rtl-optimization/115568
* lra-remat.cc (create_cands): Check that output reload insn is
adjacent to given insn.  Update a comment.

gcc/testsuite/ChangeLog:

PR rtl-optimization/115568
* gcc.target/i386/pr115568.c: New.

(cherry picked from commit 98545441308c2ae4d535f14b108ad6551fd927d5)

[Bug rtl-optimization/115568] [12/13/14 Regression] wrong code at -O2 with "-fno-tree-sink -fno-tree-ter -fschedule-insns" on x86_64-linux-gnu since r12-6122-g9407058a430316

2025-04-13 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115568

--- Comment #12 from GCC Commits  ---
The releases/gcc-14 branch has been updated by Uros Bizjak :

https://gcc.gnu.org/g:31e31bbeea657496eaa2d8bf629f6e61c6cd1266

commit r14-11600-g31e31bbeea657496eaa2d8bf629f6e61c6cd1266
Author: Richard Biener 
Date:   Wed Apr 9 14:36:19 2025 +0200

rtl-optimization/119689 - compare-debug failure with LRA

The previous change to fix LRA rematerialization broke compare-debug
for i586 bootstrap.  Fixed by using prev_nonnote_nondebug_insn
instead of prev_nonnote_insn.

PR rtl-optimization/119689
PR rtl-optimization/115568
* lra-remat.cc (create_cands): Use prev_nonnote_nondebug_insn
to check whether insn2 is directly before insn.

* g++.target/i386/pr119689.C: New testcase.

(cherry picked from commit 07de7717a22b1503760e9b79dfbe22a0f428)

[Bug rtl-optimization/115568] [12/13/14 Regression] wrong code at -O2 with "-fno-tree-sink -fno-tree-ter -fschedule-insns" on x86_64-linux-gnu since r12-6122-g9407058a430316

2025-04-13 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115568

--- Comment #14 from GCC Commits  ---
The releases/gcc-13 branch has been updated by Uros Bizjak :

https://gcc.gnu.org/g:1a2e39a5349a36deea33f5fb078edfe658daaf50

commit r13-9521-g1a2e39a5349a36deea33f5fb078edfe658daaf50
Author: Richard Biener 
Date:   Wed Apr 9 14:36:19 2025 +0200

rtl-optimization/119689 - compare-debug failure with LRA

The previous change to fix LRA rematerialization broke compare-debug
for i586 bootstrap.  Fixed by using prev_nonnote_nondebug_insn
instead of prev_nonnote_insn.

PR rtl-optimization/119689
PR rtl-optimization/115568
* lra-remat.cc (create_cands): Use prev_nonnote_nondebug_insn
to check whether insn2 is directly before insn.

* g++.target/i386/pr119689.C: New testcase.

(cherry picked from commit 07de7717a22b1503760e9b79dfbe22a0f428)

[Bug rtl-optimization/115568] [12/13/14 Regression] wrong code at -O2 with "-fno-tree-sink -fno-tree-ter -fschedule-insns" on x86_64-linux-gnu since r12-6122-g9407058a430316

2025-04-13 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115568

--- Comment #13 from GCC Commits  ---
The releases/gcc-13 branch has been updated by Uros Bizjak :

https://gcc.gnu.org/g:7578243dcd42855e4a8ae85ef8ab2598f0f6cbe9

commit r13-9520-g7578243dcd42855e4a8ae85ef8ab2598f0f6cbe9
Author: Vladimir N. Makarov 
Date:   Wed Feb 5 14:23:23 2025 -0500

[PR115568][LRA]: Use more strict output reload check in rematerialization

  In this PR case LRA rematerialized a value from inheritance insn
instead of output reload one.  This resulted in considering a
rematerilization candidate value available when it was actually
not.  As a consequence an insn after rematerliazation used the
unexpected value and this use resulted in fp exception.  The patch
fixes this bug.

gcc/ChangeLog:

PR rtl-optimization/115568
* lra-remat.cc (create_cands): Check that output reload insn is
adjacent to given insn.  Update a comment.

gcc/testsuite/ChangeLog:

PR rtl-optimization/115568
* gcc.target/i386/pr115568.c: New.

(cherry picked from commit 98545441308c2ae4d535f14b108ad6551fd927d5)

[Bug rtl-optimization/115568] [12/13/14 Regression] wrong code at -O2 with "-fno-tree-sink -fno-tree-ter -fschedule-insns" on x86_64-linux-gnu since r12-6122-g9407058a430316

2025-04-13 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115568

--- Comment #11 from GCC Commits  ---
The releases/gcc-14 branch has been updated by Uros Bizjak :

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

commit r14-11599-gdc93babdcceb4293e4a64c0770786dc8aefc1a4e
Author: Vladimir N. Makarov 
Date:   Wed Feb 5 14:23:23 2025 -0500

[PR115568][LRA]: Use more strict output reload check in rematerialization

  In this PR case LRA rematerialized a value from inheritance insn
instead of output reload one.  This resulted in considering a
rematerilization candidate value available when it was actually
not.  As a consequence an insn after rematerliazation used the
unexpected value and this use resulted in fp exception.  The patch
fixes this bug.

gcc/ChangeLog:

PR rtl-optimization/115568
* lra-remat.cc (create_cands): Check that output reload insn is
adjacent to given insn.  Update a comment.

gcc/testsuite/ChangeLog:

PR rtl-optimization/115568
* gcc.target/i386/pr115568.c: New.

(cherry picked from commit 98545441308c2ae4d535f14b108ad6551fd927d5)

[Bug rtl-optimization/115568] [12/13/14 Regression] wrong code at -O2 with "-fno-tree-sink -fno-tree-ter -fschedule-insns" on x86_64-linux-gnu since r12-6122-g9407058a430316

2025-04-09 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115568
Bug 115568 depends on bug 119689, which changed state.

Bug 119689 Summary: [15 Regression] Bootstrap comparison failure on i586-linux 
since r15-9239
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119689

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

[Bug rtl-optimization/115568] [12/13/14 Regression] wrong code at -O2 with "-fno-tree-sink -fno-tree-ter -fschedule-insns" on x86_64-linux-gnu since r12-6122-g9407058a430316

2025-04-09 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115568

--- Comment #10 from GCC Commits  ---
The master branch has been updated by Richard Biener :

https://gcc.gnu.org/g:07de7717a22b1503760e9b79dfbe22a0f428

commit r15-9334-g07de7717a22b1503760e9b79dfbe22a0f428
Author: Richard Biener 
Date:   Wed Apr 9 14:36:19 2025 +0200

rtl-optimization/119689 - compare-debug failure with LRA

The previous change to fix LRA rematerialization broke compare-debug
for i586 bootstrap.  Fixed by using prev_nonnote_nondebug_insn
instead of prev_nonnote_insn.

PR rtl-optimization/119689
PR rtl-optimization/115568
* lra-remat.cc (create_cands): Use prev_nonnote_nondebug_insn
to check whether insn2 is directly before insn.

* g++.target/i386/pr119689.C: New testcase.

[Bug rtl-optimization/115568] [12/13/14 Regression] wrong code at -O2 with "-fno-tree-sink -fno-tree-ter -fschedule-insns" on x86_64-linux-gnu since r12-6122-g9407058a430316

2025-02-06 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115568

--- Comment #9 from Uroš Bizjak  ---
The asm dump from Comment #6 now looks correct:

movl%edi, %r14d # 122   [c=4 l=3]  *movsi_internal/0
movl%r14d, -44(%rsp)# 476   [c=4 l=5]  *movsi_internal/1
->  movl-52(%rsp), %eax # 482   [c=6 l=4]  *movsi_internal/0
->  movl%eax, -36(%rsp) # 16[c=4 l=4]  *movsi_internal/1
movl%r11d, -28(%rsp)# 18[c=4 l=5]  *movsi_internal/1
notl%edi# 121   [c=4 l=2]  *one_cmplsi2_1/0
movl%edi, %r9d  # 413   [c=4 l=3]  *movsi_internal/0
movl%r13d, %r8d # 414   [c=4 l=3]  *movsi_internal/0
notl%r8d# 123   [c=4 l=3]  *one_cmplsi2_1/0
movb$1, -1(%rsp)# 312   [c=4 l=5]  *movqi_internal/8
movl%r13d, %edi # 124   [c=4 l=3]  *movsi_internal/0
movl%r14d, -52(%rsp)# 17[c=4 l=5]  *movsi_internal/1
movl%ecx, %r11d # 19[c=4 l=3]  *movsi_internal/0

[Bug rtl-optimization/115568] [12/13/14 Regression] wrong code at -O2 with "-fno-tree-sink -fno-tree-ter -fschedule-insns" on x86_64-linux-gnu since r12-6122-g9407058a430316

2025-02-05 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115568

Sam James  changed:

   What|Removed |Added

  Known to work||15.0
 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |vmakarov at gcc dot 
gnu.org
Summary|[12/13/14/15 Regression]|[12/13/14 Regression] wrong
   |wrong code at -O2 with  |code at -O2 with
   |"-fno-tree-sink |"-fno-tree-sink
   |-fno-tree-ter   |-fno-tree-ter
   |-fschedule-insns" on|-fschedule-insns" on
   |x86_64-linux-gnu since  |x86_64-linux-gnu since
   |r12-6122-g9407058a430316|r12-6122-g9407058a430316