public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/106091] New: [11/12/13 Regression] during RTL pass: swaps ICE: verify_flow_info failed: missing REG_EH_REGION note at the end of bb 69 with -fnon-call-exceptions
@ 2022-06-26 19:05 zsojka at seznam dot cz
  2022-06-26 19:17 ` [Bug target/106091] " pinskia at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: zsojka at seznam dot cz @ 2022-06-26 19:05 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 106091
           Summary: [11/12/13 Regression] during RTL pass: swaps ICE:
                    verify_flow_info failed: missing REG_EH_REGION note at
                    the end of bb 69 with -fnon-call-exceptions
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: powerpc64le-unknown-linux-gnu

Created attachment 53200
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53200&action=edit
reduced testcase

Compiler output:
$ powerpc64le-unknown-linux-gnu-gcc -O -fnon-call-exceptions -fno-tree-dce
-fno-tree-forwprop testcase.c -Wno-psabi
testcase.c: In function 'foo':
testcase.c:11:1: error: missing REG_EH_REGION note at the end of bb 69
   11 | }
      | ^
testcase.c:11:1: error: missing REG_EH_REGION note at the end of bb 52
testcase.c:11:1: error: missing REG_EH_REGION note at the end of bb 35
testcase.c:11:1: error: missing REG_EH_REGION note at the end of bb 18
during RTL pass: swaps
testcase.c:11:1: internal compiler error: verify_flow_info failed
0xab57d3 verify_flow_info()
        /repo/gcc-trunk/gcc/cfghooks.cc:284
0xec32da execute_function_todo
        /repo/gcc-trunk/gcc/passes.cc:2097
0xec385b execute_todo
        /repo/gcc-trunk/gcc/passes.cc:2139
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

$ powerpc64le-unknown-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-powerpc64le/bin/powerpc64le-unknown-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r13-1269-20220626001633-g87509781849-checking-yes-rtl-df-extra-powerpc64le/bin/../libexec/gcc/powerpc64le-unknown-linux-gnu/13.0.0/lto-wrapper
Target: powerpc64le-unknown-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--with-cloog --with-ppl --with-isl
--with-sysroot=/usr/powerpc64le-unknown-linux-gnu --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=powerpc64le-unknown-linux-gnu
--with-ld=/usr/bin/powerpc64le-unknown-linux-gnu-ld
--with-as=/usr/bin/powerpc64le-unknown-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r13-1269-20220626001633-g87509781849-checking-yes-rtl-df-extra-powerpc64le
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.0.0 20220626 (experimental) (GCC)

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

* [Bug target/106091] [11/12/13 Regression] during RTL pass: swaps ICE: verify_flow_info failed: missing REG_EH_REGION note at the end of bb 69 with -fnon-call-exceptions
  2022-06-26 19:05 [Bug rtl-optimization/106091] New: [11/12/13 Regression] during RTL pass: swaps ICE: verify_flow_info failed: missing REG_EH_REGION note at the end of bb 69 with -fnon-call-exceptions zsojka at seznam dot cz
@ 2022-06-26 19:17 ` pinskia at gcc dot gnu.org
  2022-06-27 10:46 ` rguenth at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-06-26 19:17 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|rtl-optimization            |target

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Swaps is a target specific pass.

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

* [Bug target/106091] [11/12/13 Regression] during RTL pass: swaps ICE: verify_flow_info failed: missing REG_EH_REGION note at the end of bb 69 with -fnon-call-exceptions
  2022-06-26 19:05 [Bug rtl-optimization/106091] New: [11/12/13 Regression] during RTL pass: swaps ICE: verify_flow_info failed: missing REG_EH_REGION note at the end of bb 69 with -fnon-call-exceptions zsojka at seznam dot cz
  2022-06-26 19:17 ` [Bug target/106091] " pinskia at gcc dot gnu.org
@ 2022-06-27 10:46 ` rguenth at gcc dot gnu.org
  2022-06-28 11:40 ` linkw at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-06-27 10:46 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.4

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

* [Bug target/106091] [11/12/13 Regression] during RTL pass: swaps ICE: verify_flow_info failed: missing REG_EH_REGION note at the end of bb 69 with -fnon-call-exceptions
  2022-06-26 19:05 [Bug rtl-optimization/106091] New: [11/12/13 Regression] during RTL pass: swaps ICE: verify_flow_info failed: missing REG_EH_REGION note at the end of bb 69 with -fnon-call-exceptions zsojka at seznam dot cz
  2022-06-26 19:17 ` [Bug target/106091] " pinskia at gcc dot gnu.org
  2022-06-27 10:46 ` rguenth at gcc dot gnu.org
@ 2022-06-28 11:40 ` linkw at gcc dot gnu.org
  2022-07-07  5:32 ` linkw at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: linkw at gcc dot gnu.org @ 2022-06-28 11:40 UTC (permalink / raw)
  To: gcc-bugs

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

Kewen Lin <linkw at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |linkw at gcc dot gnu.org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-06-28

--- Comment #2 from Kewen Lin <linkw at gcc dot gnu.org> ---
Confirmed, thanks for reporting.

It needs explicit option -mcpu=power8 if the default cpu type is some else.

It looks pass swaps doesn't copy REG_NOTES when replacing insns.

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

* [Bug target/106091] [11/12/13 Regression] during RTL pass: swaps ICE: verify_flow_info failed: missing REG_EH_REGION note at the end of bb 69 with -fnon-call-exceptions
  2022-06-26 19:05 [Bug rtl-optimization/106091] New: [11/12/13 Regression] during RTL pass: swaps ICE: verify_flow_info failed: missing REG_EH_REGION note at the end of bb 69 with -fnon-call-exceptions zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2022-06-28 11:40 ` linkw at gcc dot gnu.org
@ 2022-07-07  5:32 ` linkw at gcc dot gnu.org
  2022-07-25 15:51 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: linkw at gcc dot gnu.org @ 2022-07-07  5:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Kewen Lin <linkw at gcc dot gnu.org> ---
Created attachment 53268
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53268&action=edit
tested patch

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

* [Bug target/106091] [11/12/13 Regression] during RTL pass: swaps ICE: verify_flow_info failed: missing REG_EH_REGION note at the end of bb 69 with -fnon-call-exceptions
  2022-06-26 19:05 [Bug rtl-optimization/106091] New: [11/12/13 Regression] during RTL pass: swaps ICE: verify_flow_info failed: missing REG_EH_REGION note at the end of bb 69 with -fnon-call-exceptions zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2022-07-07  5:32 ` linkw at gcc dot gnu.org
@ 2022-07-25 15:51 ` rguenth at gcc dot gnu.org
  2022-07-25 16:37 ` segher at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-07-25 15:51 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-checking
           Priority|P3                          |P2

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

* [Bug target/106091] [11/12/13 Regression] during RTL pass: swaps ICE: verify_flow_info failed: missing REG_EH_REGION note at the end of bb 69 with -fnon-call-exceptions
  2022-06-26 19:05 [Bug rtl-optimization/106091] New: [11/12/13 Regression] during RTL pass: swaps ICE: verify_flow_info failed: missing REG_EH_REGION note at the end of bb 69 with -fnon-call-exceptions zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2022-07-25 15:51 ` rguenth at gcc dot gnu.org
@ 2022-07-25 16:37 ` segher at gcc dot gnu.org
  2022-07-26  2:31 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: segher at gcc dot gnu.org @ 2022-07-25 16:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Segher Boessenkool <segher at gcc dot gnu.org> ---
That patch looks good :-)

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

* [Bug target/106091] [11/12/13 Regression] during RTL pass: swaps ICE: verify_flow_info failed: missing REG_EH_REGION note at the end of bb 69 with -fnon-call-exceptions
  2022-06-26 19:05 [Bug rtl-optimization/106091] New: [11/12/13 Regression] during RTL pass: swaps ICE: verify_flow_info failed: missing REG_EH_REGION note at the end of bb 69 with -fnon-call-exceptions zsojka at seznam dot cz
                   ` (5 preceding siblings ...)
  2022-07-25 16:37 ` segher at gcc dot gnu.org
@ 2022-07-26  2:31 ` cvs-commit at gcc dot gnu.org
  2022-08-02  3:53 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-07-26  2:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Kewen Lin <linkw@gcc.gnu.org>:

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

commit r13-1832-gf4286601933406142b46693660f7f4b682cb50a5
Author: Kewen Lin <linkw@linux.ibm.com>
Date:   Mon Jul 25 21:29:14 2022 -0500

    rs6000: Preserve REG_EH_REGION when replacing load/store [PR106091]

    As test case in PR106091 shows, rs6000 specific pass swaps
    doesn't preserve the reg_note REG_EH_REGION when replacing
    some load insn at the end of basic block, it causes the
    flow info verification to fail unexpectedly.  Since memory
    reference rtx may trap, this patch is to ensure we copy
    REG_EH_REGION reg_note while replacing swapped aligned load
    or store.

            PR target/106091

    gcc/ChangeLog:

            * config/rs6000/rs6000-p8swap.cc (replace_swapped_aligned_store):
Copy
            REG_EH_REGION when replacing one store insn having it.
            (replace_swapped_aligned_load): Likewise.

    gcc/testsuite/ChangeLog:

            * gcc.target/powerpc/pr106091.c: New test.

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

* [Bug target/106091] [11/12/13 Regression] during RTL pass: swaps ICE: verify_flow_info failed: missing REG_EH_REGION note at the end of bb 69 with -fnon-call-exceptions
  2022-06-26 19:05 [Bug rtl-optimization/106091] New: [11/12/13 Regression] during RTL pass: swaps ICE: verify_flow_info failed: missing REG_EH_REGION note at the end of bb 69 with -fnon-call-exceptions zsojka at seznam dot cz
                   ` (6 preceding siblings ...)
  2022-07-26  2:31 ` cvs-commit at gcc dot gnu.org
@ 2022-08-02  3:53 ` cvs-commit at gcc dot gnu.org
  2022-08-02  3:56 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-08-02  3:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Kewen Lin <linkw@gcc.gnu.org>:

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

commit r10-10924-ga2ead00af2731e5551b15523ebf8f3e68c4e2ecb
Author: Kewen Lin <linkw@linux.ibm.com>
Date:   Mon Jul 25 21:29:14 2022 -0500

    rs6000: Preserve REG_EH_REGION when replacing load/store [PR106091]

    As test case in PR106091 shows, rs6000 specific pass swaps
    doesn't preserve the reg_note REG_EH_REGION when replacing
    some load insn at the end of basic block, it causes the
    flow info verification to fail unexpectedly.  Since memory
    reference rtx may trap, this patch is to ensure we copy
    REG_EH_REGION reg_note while replacing swapped aligned load
    or store.

            PR target/106091

    gcc/ChangeLog:

            * config/rs6000/rs6000-p8swap.c (replace_swapped_aligned_store):
Copy
            REG_EH_REGION when replacing one store insn having it.
            (replace_swapped_aligned_load): Likewise.

    gcc/testsuite/ChangeLog:

            * gcc.target/powerpc/pr106091.c: New test.

    (cherry picked from commit f4286601933406142b46693660f7f4b682cb50a5)

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

* [Bug target/106091] [11/12/13 Regression] during RTL pass: swaps ICE: verify_flow_info failed: missing REG_EH_REGION note at the end of bb 69 with -fnon-call-exceptions
  2022-06-26 19:05 [Bug rtl-optimization/106091] New: [11/12/13 Regression] during RTL pass: swaps ICE: verify_flow_info failed: missing REG_EH_REGION note at the end of bb 69 with -fnon-call-exceptions zsojka at seznam dot cz
                   ` (7 preceding siblings ...)
  2022-08-02  3:53 ` cvs-commit at gcc dot gnu.org
@ 2022-08-02  3:56 ` cvs-commit at gcc dot gnu.org
  2022-08-02  3:58 ` cvs-commit at gcc dot gnu.org
  2022-08-02  4:06 ` linkw at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-08-02  3:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Kewen Lin <linkw@gcc.gnu.org>:

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

commit r11-10186-gcd014105121275d1b226cb494277663d9181ab01
Author: Kewen Lin <linkw@linux.ibm.com>
Date:   Mon Jul 25 21:29:14 2022 -0500

    rs6000: Preserve REG_EH_REGION when replacing load/store [PR106091]

    As test case in PR106091 shows, rs6000 specific pass swaps
    doesn't preserve the reg_note REG_EH_REGION when replacing
    some load insn at the end of basic block, it causes the
    flow info verification to fail unexpectedly.  Since memory
    reference rtx may trap, this patch is to ensure we copy
    REG_EH_REGION reg_note while replacing swapped aligned load
    or store.

            PR target/106091

    gcc/ChangeLog:

            * config/rs6000/rs6000-p8swap.c (replace_swapped_aligned_store):
Copy
            REG_EH_REGION when replacing one store insn having it.
            (replace_swapped_aligned_load): Likewise.

    gcc/testsuite/ChangeLog:

            * gcc.target/powerpc/pr106091.c: New test.

    (cherry picked from commit f4286601933406142b46693660f7f4b682cb50a5)

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

* [Bug target/106091] [11/12/13 Regression] during RTL pass: swaps ICE: verify_flow_info failed: missing REG_EH_REGION note at the end of bb 69 with -fnon-call-exceptions
  2022-06-26 19:05 [Bug rtl-optimization/106091] New: [11/12/13 Regression] during RTL pass: swaps ICE: verify_flow_info failed: missing REG_EH_REGION note at the end of bb 69 with -fnon-call-exceptions zsojka at seznam dot cz
                   ` (8 preceding siblings ...)
  2022-08-02  3:56 ` cvs-commit at gcc dot gnu.org
@ 2022-08-02  3:58 ` cvs-commit at gcc dot gnu.org
  2022-08-02  4:06 ` linkw at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-08-02  3:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Kewen Lin <linkw@gcc.gnu.org>:

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

commit r12-8650-gbd521701c819710a244eae87b097b6acb534756b
Author: Kewen Lin <linkw@linux.ibm.com>
Date:   Mon Jul 25 21:29:14 2022 -0500

    rs6000: Preserve REG_EH_REGION when replacing load/store [PR106091]

    As test case in PR106091 shows, rs6000 specific pass swaps
    doesn't preserve the reg_note REG_EH_REGION when replacing
    some load insn at the end of basic block, it causes the
    flow info verification to fail unexpectedly.  Since memory
    reference rtx may trap, this patch is to ensure we copy
    REG_EH_REGION reg_note while replacing swapped aligned load
    or store.

            PR target/106091

    gcc/ChangeLog:

            * config/rs6000/rs6000-p8swap.cc (replace_swapped_aligned_store):
Copy
            REG_EH_REGION when replacing one store insn having it.
            (replace_swapped_aligned_load): Likewise.

    gcc/testsuite/ChangeLog:

            * gcc.target/powerpc/pr106091.c: New test.

    (cherry picked from commit f4286601933406142b46693660f7f4b682cb50a5)

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

* [Bug target/106091] [11/12/13 Regression] during RTL pass: swaps ICE: verify_flow_info failed: missing REG_EH_REGION note at the end of bb 69 with -fnon-call-exceptions
  2022-06-26 19:05 [Bug rtl-optimization/106091] New: [11/12/13 Regression] during RTL pass: swaps ICE: verify_flow_info failed: missing REG_EH_REGION note at the end of bb 69 with -fnon-call-exceptions zsojka at seznam dot cz
                   ` (9 preceding siblings ...)
  2022-08-02  3:58 ` cvs-commit at gcc dot gnu.org
@ 2022-08-02  4:06 ` linkw at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: linkw at gcc dot gnu.org @ 2022-08-02  4:06 UTC (permalink / raw)
  To: gcc-bugs

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

Kewen Lin <linkw at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #9 from Kewen Lin <linkw at gcc dot gnu.org> ---
Should be fixed on trunk and release branches.

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

end of thread, other threads:[~2022-08-02  4:06 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-26 19:05 [Bug rtl-optimization/106091] New: [11/12/13 Regression] during RTL pass: swaps ICE: verify_flow_info failed: missing REG_EH_REGION note at the end of bb 69 with -fnon-call-exceptions zsojka at seznam dot cz
2022-06-26 19:17 ` [Bug target/106091] " pinskia at gcc dot gnu.org
2022-06-27 10:46 ` rguenth at gcc dot gnu.org
2022-06-28 11:40 ` linkw at gcc dot gnu.org
2022-07-07  5:32 ` linkw at gcc dot gnu.org
2022-07-25 15:51 ` rguenth at gcc dot gnu.org
2022-07-25 16:37 ` segher at gcc dot gnu.org
2022-07-26  2:31 ` cvs-commit at gcc dot gnu.org
2022-08-02  3:53 ` cvs-commit at gcc dot gnu.org
2022-08-02  3:56 ` cvs-commit at gcc dot gnu.org
2022-08-02  3:58 ` cvs-commit at gcc dot gnu.org
2022-08-02  4:06 ` linkw 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).