public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/104024] New: ICE in curr_insn_transform, at lra-constraints.c:4132
@ 2022-01-14  8:35 marxin at gcc dot gnu.org
  2022-02-16  5:44 ` [Bug target/104024] ICE in curr_insn_transform with -O1 -mpower10-fusion -mpower10-fusion-2logical with __int128_t and __builtin_add_overflow linkw at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-01-14  8:35 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104024
           Summary: ICE in curr_insn_transform, at lra-constraints.c:4132
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: krebbel at gcc dot gnu.org, segher at gcc dot gnu.org
  Target Milestone: ---
              Host: x86_64-linux-gnu
            Target: ppc64-linux-gnu

The following ICEs:

$ ppc64-linux-gnu-gcc
/home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/torture/builtin-arith-overflow-6.c
-O1 -mpower10-fusion -mpower10-fusion-2logical
In file included from
/home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/torture/builtin-arith-overflow-1.h:1,
                 from
/home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/torture/builtin-arith-overflow-6.c:5:
/home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/torture/builtin-arith-overflow-6.c:
In function ‘t100_1add’:
/home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/torture/builtin-arith-overflow.h:28:1:
error: unable to generate reloads for:
   28 | }                                               \
      | ^
/home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/torture/builtin-arith-overflow.h:159:1:
note: in expansion of macro ‘T’
  159 | T (n, t, t, t, v1, v2, vr, b, o)
      | ^
/home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/torture/builtin-arith-overflow-1.h:4:1:
note: in expansion of macro ‘ST’
    4 | ST (100, signed type, 2, 3, 5, U(s, add), 0) \
      | ^~
/home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/torture/builtin-arith-overflow-6.c:11:1:
note: in expansion of macro ‘TESTS’
   11 | TESTS (__int128, INT128_MIN, INT128_MAX)
      | ^~~~~
(insn 13 78 50 2 (parallel [
            (set (reg:TI 128)
                (and:TI (xor:TI (reg:TI 124)
                        (reg/v:TI 123 [ y ]))
                    (reg:TI 127)))
            (clobber (reg:TI 147))
        ])
"/home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/torture/builtin-arith-overflow-6.c":11:1
2690 {*fuse_vxor_vand}
     (expr_list:REG_UNUSED (reg:TI 147)
        (expr_list:REG_DEAD (reg:TI 127)
            (expr_list:REG_DEAD (reg/v:TI 123 [ y ])
                (nil)))))
during RTL pass: reload
/home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/torture/builtin-arith-overflow.h:28:1:
internal compiler error: in curr_insn_transform, at lra-constraints.c:4132
   28 | }                                               \
      | ^
/home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/torture/builtin-arith-overflow.h:159:1:
note: in expansion of macro ‘T’
  159 | T (n, t, t, t, v1, v2, vr, b, o)
      | ^
/home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/torture/builtin-arith-overflow-1.h:4:1:
note: in expansion of macro ‘ST’
    4 | ST (100, signed type, 2, 3, 5, U(s, add), 0) \
      | ^~
/home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/torture/builtin-arith-overflow-6.c:11:1:
note: in expansion of macro ‘TESTS’
   11 | TESTS (__int128, INT128_MIN, INT128_MAX)
      | ^~~~~
0x5f1d79 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64/build/gcc/rtl-error.c:108
0x5ea4c8 curr_insn_transform
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64/build/gcc/lra-constraints.c:4132
0xa00cc5 lra_constraints(bool)
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64/build/gcc/lra-constraints.c:5161
0x9ef182 lra(_IO_FILE*)
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64/build/gcc/lra.c:2336
0x9ab6a9 do_reload
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64/build/gcc/ira.c:5934
0x9ab6a9 execute
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64/build/gcc/ira.c:6120
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

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

* [Bug target/104024] ICE in curr_insn_transform with -O1 -mpower10-fusion -mpower10-fusion-2logical with __int128_t and __builtin_add_overflow
  2022-01-14  8:35 [Bug target/104024] New: ICE in curr_insn_transform, at lra-constraints.c:4132 marxin at gcc dot gnu.org
@ 2022-02-16  5:44 ` linkw at gcc dot gnu.org
  2022-02-18  8:48 ` linkw at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: linkw at gcc dot gnu.org @ 2022-02-16  5:44 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
                 CC|                            |linkw at gcc dot gnu.org
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-02-16
           Assignee|unassigned at gcc dot gnu.org      |linkw at gcc dot gnu.org

--- Comment #1 from Kewen Lin <linkw at gcc dot gnu.org> ---
Confirmed.

Can't reproduce it on ppc64le p8 and ppc64 p8, but can reproduce this with
cross build gcc.

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

* [Bug target/104024] ICE in curr_insn_transform with -O1 -mpower10-fusion -mpower10-fusion-2logical with __int128_t and __builtin_add_overflow
  2022-01-14  8:35 [Bug target/104024] New: ICE in curr_insn_transform, at lra-constraints.c:4132 marxin at gcc dot gnu.org
  2022-02-16  5:44 ` [Bug target/104024] ICE in curr_insn_transform with -O1 -mpower10-fusion -mpower10-fusion-2logical with __int128_t and __builtin_add_overflow linkw at gcc dot gnu.org
@ 2022-02-18  8:48 ` linkw at gcc dot gnu.org
  2022-02-18  8:49 ` linkw at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: linkw at gcc dot gnu.org @ 2022-02-18  8:48 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

* [Bug target/104024] ICE in curr_insn_transform with -O1 -mpower10-fusion -mpower10-fusion-2logical with __int128_t and __builtin_add_overflow
  2022-01-14  8:35 [Bug target/104024] New: ICE in curr_insn_transform, at lra-constraints.c:4132 marxin at gcc dot gnu.org
  2022-02-16  5:44 ` [Bug target/104024] ICE in curr_insn_transform with -O1 -mpower10-fusion -mpower10-fusion-2logical with __int128_t and __builtin_add_overflow linkw at gcc dot gnu.org
  2022-02-18  8:48 ` linkw at gcc dot gnu.org
@ 2022-02-18  8:49 ` linkw at gcc dot gnu.org
  2022-02-18 17:25 ` segher at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: linkw at gcc dot gnu.org @ 2022-02-18  8:49 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

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

* [Bug target/104024] ICE in curr_insn_transform with -O1 -mpower10-fusion -mpower10-fusion-2logical with __int128_t and __builtin_add_overflow
  2022-01-14  8:35 [Bug target/104024] New: ICE in curr_insn_transform, at lra-constraints.c:4132 marxin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2022-02-18  8:49 ` linkw at gcc dot gnu.org
@ 2022-02-18 17:25 ` segher at gcc dot gnu.org
  2022-02-21  2:29 ` linkw at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: segher at gcc dot gnu.org @ 2022-02-18 17:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Most of those options were removed.  Does this problem (adjusted properly,
those options are now enabled iff you use -mcpu=power10 or later) still
happen on trunk?

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

* [Bug target/104024] ICE in curr_insn_transform with -O1 -mpower10-fusion -mpower10-fusion-2logical with __int128_t and __builtin_add_overflow
  2022-01-14  8:35 [Bug target/104024] New: ICE in curr_insn_transform, at lra-constraints.c:4132 marxin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2022-02-18 17:25 ` segher at gcc dot gnu.org
@ 2022-02-21  2:29 ` linkw at gcc dot gnu.org
  2023-06-15 10:37 ` jamborm at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: linkw at gcc dot gnu.org @ 2022-02-21  2:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Kewen Lin <linkw at gcc dot gnu.org> ---
(In reply to Segher Boessenkool from comment #3)
> Most of those options were removed.  Does this problem (adjusted properly,
> those options are now enabled iff you use -mcpu=power10 or later) still
> happen on trunk?

Yes, even if the option -mpower10-fusion is changed to "Undocumented" by
r12-7297, it can still be enabled by the explicit -mpower10-fusion without
-mcpu=power10, the ICE still happens on trunk.

$ /home/linkw/gcc/build/gcc-fix-debug/gcc/xgcc -v 2>&1 | grep "gcc version"
gcc version 12.0.1 20220221 (experimental) (GCC)

$ /home/linkw/gcc/build/gcc-fix-debug/gcc/xgcc -B
/home/linkw/gcc/build/gcc-fix-debug/gcc/ pr104024-1.c -mpower10-fusion  -S
-mcpu=power6 -O1

pr104024-1.c:16:1: error: unable to generate reloads for:
   16 | }
      | ^
(insn 13 78 50 2 (parallel [
            (set (reg:TI 128)
                (and:TI (xor:TI (reg:TI 124)
                        (reg/v:TI 123 [ y ]))
                    (reg:TI 127)))
            (clobber (reg:TI 147))
        ]) "pr104024-1.c":13:7 2564 {*fuse_vxor_vand}
     (expr_list:REG_UNUSED (reg:TI 147)
        (expr_list:REG_DEAD (reg:TI 127)
            (expr_list:REG_DEAD (reg/v:TI 123 [ y ])
                (nil)))))
during RTL pass: reload

Will adjust, rebase, re-test and resend out the patch to gcc-patch@ later.

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

* [Bug target/104024] ICE in curr_insn_transform with -O1 -mpower10-fusion -mpower10-fusion-2logical with __int128_t and __builtin_add_overflow
  2022-01-14  8:35 [Bug target/104024] New: ICE in curr_insn_transform, at lra-constraints.c:4132 marxin at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2022-02-21  2:29 ` linkw at gcc dot gnu.org
@ 2023-06-15 10:37 ` jamborm at gcc dot gnu.org
  2023-06-16 12:14 ` linkw at gcc dot gnu.org
  2023-09-12  9:15 ` linkw at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jamborm at gcc dot gnu.org @ 2023-06-15 10:37 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Jambor <jamborm at gcc dot gnu.org> changed:

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

--- Comment #5 from Martin Jambor <jamborm at gcc dot gnu.org> ---
I have just seen a similar ICE with a ppc64le cross-compiler.  Running

~/cross/bin/ppc64le-linux-gnu-gcc
/home/worker/buildworker/tiber-option-juggler/build/gcc/testsuite/c-c++-common/torture/builtin-arith-overflow-p-6.c
-mpower10-fusion -mno-vsx -Og

(where the input comes from our testcase but the options are of course
invented) results in ICE in in curr_insn_transform, at lra-constraints.cc:4231.
 Is this the same issue or should I file a new bug?

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

* [Bug target/104024] ICE in curr_insn_transform with -O1 -mpower10-fusion -mpower10-fusion-2logical with __int128_t and __builtin_add_overflow
  2022-01-14  8:35 [Bug target/104024] New: ICE in curr_insn_transform, at lra-constraints.c:4132 marxin at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2023-06-15 10:37 ` jamborm at gcc dot gnu.org
@ 2023-06-16 12:14 ` linkw at gcc dot gnu.org
  2023-09-12  9:15 ` linkw at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: linkw at gcc dot gnu.org @ 2023-06-16 12:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Kewen Lin <linkw at gcc dot gnu.org> ---
(In reply to Martin Jambor from comment #5)
> I have just seen a similar ICE with a ppc64le cross-compiler.  Running
> 
> ~/cross/bin/ppc64le-linux-gnu-gcc
> /home/worker/buildworker/tiber-option-juggler/build/gcc/testsuite/c-c++-
> common/torture/builtin-arith-overflow-p-6.c -mpower10-fusion -mno-vsx -Og
> 
> (where the input comes from our testcase but the options are of course
> invented) results in ICE in in curr_insn_transform, at
> lra-constraints.cc:4231.  Is this the same issue or should I file a new bug?

I believe it's due to the same root cause, -mcpu=power6 doesn't enable any vsx
features (like -mno-vsx), you don't need to open a new one. :)

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

* [Bug target/104024] ICE in curr_insn_transform with -O1 -mpower10-fusion -mpower10-fusion-2logical with __int128_t and __builtin_add_overflow
  2022-01-14  8:35 [Bug target/104024] New: ICE in curr_insn_transform, at lra-constraints.c:4132 marxin at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2023-06-16 12:14 ` linkw at gcc dot gnu.org
@ 2023-09-12  9:15 ` linkw at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: linkw at gcc dot gnu.org @ 2023-09-12  9:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Kewen Lin <linkw at gcc dot gnu.org> ---
*** Bug 111371 has been marked as a duplicate of this bug. ***

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

end of thread, other threads:[~2023-09-12  9:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-14  8:35 [Bug target/104024] New: ICE in curr_insn_transform, at lra-constraints.c:4132 marxin at gcc dot gnu.org
2022-02-16  5:44 ` [Bug target/104024] ICE in curr_insn_transform with -O1 -mpower10-fusion -mpower10-fusion-2logical with __int128_t and __builtin_add_overflow linkw at gcc dot gnu.org
2022-02-18  8:48 ` linkw at gcc dot gnu.org
2022-02-18  8:49 ` linkw at gcc dot gnu.org
2022-02-18 17:25 ` segher at gcc dot gnu.org
2022-02-21  2:29 ` linkw at gcc dot gnu.org
2023-06-15 10:37 ` jamborm at gcc dot gnu.org
2023-06-16 12:14 ` linkw at gcc dot gnu.org
2023-09-12  9:15 ` 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).