public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/112918] New: [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90)
@ 2023-12-08 10:53 schwab@linux-m68k.org
  2023-12-08 13:07 ` [Bug target/112918] " rguenth at gcc dot gnu.org
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: schwab@linux-m68k.org @ 2023-12-08 10:53 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 112918
           Summary: [m68k] [LRA] ICE: maximum number of generated reload
                    insns per insn achieved (90)
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: schwab@linux-m68k.org
  Target Milestone: ---
            Target: m68k-*-*

When enabling LRA on m68k the compiler ICEs when compiling libstdc++:

$ ../../../../gcc/xgcc -shared-libgcc -B../../../../gcc -nostdinc++ -L..
-L../.libs -L../../libsupc++/.libs -I../../../../../libstdc++-v3/../libgcc
-I../../include/m68k-linux -I../../include
-I../../../../../libstdc++-v3/libsupc++ -std=gnu++17 -nostdinc++
-D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings
-Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections
-fdata-sections -frandom-seed=floating_from_chars.lo -fimplicit-templates -g
-O2 -D_GNU_SOURCE -c
../../../../../libstdc++-v3/src/c++17/floating_from_chars.cc  -fPIC -DPIC
-D_GLIBCXX_SHARED -o floating_from_chars.o
during RTL pass: reload
../../../../../libstdc++-v3/src/c++17/floating_from_chars.cc: In function
‘std::from_chars_result std::__from_chars_float16_t(const char*, const char*,
float&, chars_format)’:
../../../../../libstdc++-v3/src/c++17/floating_from_chars.cc:1289:1: internal
compiler error: maximum number of generated reload insns per insn achieved (90)
 1289 | }
      | ^
0xed33c0 lra_constraints(bool)
        ../../gcc/lra-constraints.cc:5429
0xeba98a lra(_IO_FILE*, int)
        ../../gcc/lra.cc:2440
0xe688c7 do_reload
        ../../gcc/ira.cc:5973
0xe688c7 execute
        ../../gcc/ira.cc:6161
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.

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

* [Bug target/112918] [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90)
  2023-12-08 10:53 [Bug target/112918] New: [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90) schwab@linux-m68k.org
@ 2023-12-08 13:07 ` rguenth at gcc dot gnu.org
  2023-12-08 13:08 ` rguenth at gcc dot gnu.org
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-12-08 13:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Can you attach preprocessed source and the cc1plus command line to reproduce
this with a simple all-gcc cross?

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

* [Bug target/112918] [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90)
  2023-12-08 10:53 [Bug target/112918] New: [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90) schwab@linux-m68k.org
  2023-12-08 13:07 ` [Bug target/112918] " rguenth at gcc dot gnu.org
@ 2023-12-08 13:08 ` rguenth at gcc dot gnu.org
  2023-12-08 13:32 ` schwab@linux-m68k.org
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-12-08 13:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Also if a C only compiler builds OK fallout in the testsuite might be easier to
analyze.

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

* [Bug target/112918] [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90)
  2023-12-08 10:53 [Bug target/112918] New: [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90) schwab@linux-m68k.org
  2023-12-08 13:07 ` [Bug target/112918] " rguenth at gcc dot gnu.org
  2023-12-08 13:08 ` rguenth at gcc dot gnu.org
@ 2023-12-08 13:32 ` schwab@linux-m68k.org
  2023-12-08 13:36 ` schwab@linux-m68k.org
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: schwab@linux-m68k.org @ 2023-12-08 13:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Andreas Schwab <schwab@linux-m68k.org> ---
Created attachment 56833
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56833&action=edit
floating_from_chars.ii

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

* [Bug target/112918] [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90)
  2023-12-08 10:53 [Bug target/112918] New: [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90) schwab@linux-m68k.org
                   ` (2 preceding siblings ...)
  2023-12-08 13:32 ` schwab@linux-m68k.org
@ 2023-12-08 13:36 ` schwab@linux-m68k.org
  2023-12-08 14:30 ` schwab@linux-m68k.org
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: schwab@linux-m68k.org @ 2023-12-08 13:36 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Andreas Schwab <schwab@linux-m68k.org> ---
It seems to be related to -fPIC.

cc1plus -fpreprocessed floating_from_chars.ii -quiet -mcpu=68020 -O2
-std=gnu++17 -fimplicit-templates -fPIC -o floating_from_chars.s

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

* [Bug target/112918] [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90)
  2023-12-08 10:53 [Bug target/112918] New: [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90) schwab@linux-m68k.org
                   ` (3 preceding siblings ...)
  2023-12-08 13:36 ` schwab@linux-m68k.org
@ 2023-12-08 14:30 ` schwab@linux-m68k.org
  2023-12-08 19:34 ` schwab@linux-m68k.org
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: schwab@linux-m68k.org @ 2023-12-08 14:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Andreas Schwab <schwab@linux-m68k.org> ---
spawn -ignore SIGHUP /daten/aranym/gcc/gcc-20231208/Build/gcc/xgcc
-B/daten/aranym/gcc/gcc-20231208/Build/gcc/ -fdiagnostics-plain-output -O1 -w
-fpermissive -c -o pr82052.o
/daten/aranym/gcc/gcc-20231208/gcc/testsuite/gcc.c-torture/compile/pr82052.c
/daten/aranym/gcc/gcc-20231208/gcc/testsuite/gcc.c-torture/compile/pr82052.c:
In function 'main':
/daten/aranym/gcc/gcc-20231208/gcc/testsuite/gcc.c-torture/compile/pr82052.c:394:1:
error: insn does not satisfy its constraints:
(insn 1377 3034 3035 128 (set (reg:SI 9 %a1 [2134])
        (plus:SI (sign_extend:SI (reg:HI 9 %a1 [orig:2132 t83 ] [2132]))
            (reg:SI 2 %d2 [2940])))
"/daten/aranym/gcc/gcc-20231208/gcc/testsuite/gcc.c-torture/compile/pr82052.c":294:45
407 {*lea}
     (nil))
during RTL pass: reload
/daten/aranym/gcc/gcc-20231208/gcc/testsuite/gcc.c-torture/compile/pr82052.c:394:1:
internal compiler error: in extract_constrain_insn, at recog.cc:2713
0x6466d0 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
        ../../gcc/rtl-error.cc:108
0x6466f9 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
        ../../gcc/rtl-error.cc:118
0xd41b7d extract_constrain_insn(rtx_insn*)
        ../../gcc/recog.cc:2713
0xbcad47 check_rtl
        ../../gcc/lra.cc:2187
0xbd07c2 lra(_IO_FILE*, int)
        ../../gcc/lra.cc:2608
0xb7def7 do_reload
        ../../gcc/ira.cc:5973
0xb7def7 execute
        ../../gcc/ira.cc:6161

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

* [Bug target/112918] [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90)
  2023-12-08 10:53 [Bug target/112918] New: [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90) schwab@linux-m68k.org
                   ` (4 preceding siblings ...)
  2023-12-08 14:30 ` schwab@linux-m68k.org
@ 2023-12-08 19:34 ` schwab@linux-m68k.org
  2023-12-08 19:37 ` schwab@linux-m68k.org
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: schwab@linux-m68k.org @ 2023-12-08 19:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Andreas Schwab <schwab@linux-m68k.org> ---
spawn -ignore SIGHUP /daten/aranym/gcc/gcc-20231208/Build/gcc/xgcc
-B/daten/aranym/gcc/gcc-20231208/Build/gcc/ -fdiagnostics-plain-output
-mcpu=5235 -Os -c -o pr64461.o
/daten/aranym/gcc/gcc-20231208/gcc/testsuite/gcc.target/m68k/pr64461.c
during RTL pass: reload
/daten/aranym/gcc/gcc-20231208/gcc/testsuite/gcc.target/m68k/pr64461.c: In
function 'rtems_rfs_block_map_indirect_alloc':
/daten/aranym/gcc/gcc-20231208/gcc/testsuite/gcc.target/m68k/pr64461.c:16:1:
internal compiler error: in lra_set_insn_recog_data, at lra.cc:1034
0xbccb1f lra_set_insn_recog_data(rtx_insn*)
        ../../gcc/lra.cc:1032
0xbcd496 lra_get_insn_recog_data(rtx_insn*)
        ../../gcc/lra-int.h:503
0xbcd496 setup_sp_offset
        ../../gcc/lra.cc:1875
0xbcee55 lra_process_new_insns(rtx_insn*, rtx_insn*, rtx_insn*, char const*)
        ../../gcc/lra.cc:1923
0xbe647e curr_insn_transform
        ../../gcc/lra-constraints.cc:4893
0xbe7f0e lra_constraints(bool)
        ../../gcc/lra-constraints.cc:5511
0xbcffba lra(_IO_FILE*, int)
        ../../gcc/lra.cc:2440
0xb7def7 do_reload
        ../../gcc/ira.cc:5973
0xb7def7 execute
        ../../gcc/ira.cc:6161

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

* [Bug target/112918] [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90)
  2023-12-08 10:53 [Bug target/112918] New: [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90) schwab@linux-m68k.org
                   ` (5 preceding siblings ...)
  2023-12-08 19:34 ` schwab@linux-m68k.org
@ 2023-12-08 19:37 ` schwab@linux-m68k.org
  2023-12-11 10:12 ` rguenth at gcc dot gnu.org
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: schwab@linux-m68k.org @ 2023-12-08 19:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Andreas Schwab <schwab@linux-m68k.org> ---
spawn -ignore SIGHUP /daten/aranym/gcc/gcc-20231208/Build/gcc/xgcc
-B/daten/aranym/gcc/gcc-20231208/Build/gcc/
/daten/aranym/gcc/gcc-20231208/gcc/testsuite/gcc.dg/torture/vshuf-v16qi.c
-fdiagnostics-plain-output -O2 -lm -o ./vshuf-v16qi.exe
during RTL pass: reload
In file included from
/daten/aranym/gcc/gcc-20231208/gcc/testsuite/gcc.dg/torture/vshuf-v16qi.c:11:
/daten/aranym/gcc/gcc-20231208/gcc/testsuite/gcc.dg/torture/vshuf-main.inc: In
function 'test_3':
/daten/aranym/gcc/gcc-20231208/gcc/testsuite/gcc.dg/torture/vshuf-main.inc:27:1:
internal compiler error: maximum number of generated reload insns per insn
achieved (90)
/daten/aranym/gcc/gcc-20231208/gcc/testsuite/gcc.dg/torture/vshuf-16.inc:6:1:
note: in expansion of macro 'T'
/daten/aranym/gcc/gcc-20231208/gcc/testsuite/gcc.dg/torture/vshuf-main.inc:28:1:
note: in expansion of macro 'TESTS'
0xbe89f0 lra_constraints(bool)
        ../../gcc/lra-constraints.cc:5429
0xbcffba lra(_IO_FILE*, int)
        ../../gcc/lra.cc:2440
0xb7def7 do_reload
        ../../gcc/ira.cc:5973
0xb7def7 execute
        ../../gcc/ira.cc:6161

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

* [Bug target/112918] [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90)
  2023-12-08 10:53 [Bug target/112918] New: [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90) schwab@linux-m68k.org
                   ` (6 preceding siblings ...)
  2023-12-08 19:37 ` schwab@linux-m68k.org
@ 2023-12-11 10:12 ` rguenth at gcc dot gnu.org
  2023-12-11 10:29 ` rguenth at gcc dot gnu.org
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-12-11 10:12 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2023-12-11

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Andreas Schwab from comment #7)
> spawn -ignore SIGHUP /daten/aranym/gcc/gcc-20231208/Build/gcc/xgcc
> -B/daten/aranym/gcc/gcc-20231208/Build/gcc/
> /daten/aranym/gcc/gcc-20231208/gcc/testsuite/gcc.dg/torture/vshuf-v16qi.c
> -fdiagnostics-plain-output -O2 -lm -o ./vshuf-v16qi.exe
> during RTL pass: reload
> In file included from
> /daten/aranym/gcc/gcc-20231208/gcc/testsuite/gcc.dg/torture/vshuf-v16qi.c:11:
> /daten/aranym/gcc/gcc-20231208/gcc/testsuite/gcc.dg/torture/vshuf-main.inc:
> In function 'test_3':
> /daten/aranym/gcc/gcc-20231208/gcc/testsuite/gcc.dg/torture/vshuf-main.inc:
> 27:1: internal compiler error: maximum number of generated reload insns per
> insn achieved (90)
> /daten/aranym/gcc/gcc-20231208/gcc/testsuite/gcc.dg/torture/vshuf-16.inc:6:1:
> note: in expansion of macro 'T'
> /daten/aranym/gcc/gcc-20231208/gcc/testsuite/gcc.dg/torture/vshuf-main.inc:
> 28:1: note: in expansion of macro 'TESTS'
> 0xbe89f0 lra_constraints(bool)
>         ../../gcc/lra-constraints.cc:5429
> 0xbcffba lra(_IO_FILE*, int)
>         ../../gcc/lra.cc:2440
> 0xb7def7 do_reload
>         ../../gcc/ira.cc:5973
> 0xb7def7 execute
>         ../../gcc/ira.cc:6161

...
(insn 269 268 270 2 (set (reg:QI 226)
        (reg:QI 225))
"/space/rguenther/src/gcc/gcc/testsuite/gcc.dg/torture/vshuf-main.inc":28:1 62
{*m68k.md:1130}
     (nil))
(insn 270 269 271 2 (set (reg:QI 227)
        (reg:QI 226))
"/space/rguenther/src/gcc/gcc/testsuite/gcc.dg/torture/vshuf-main.inc":28:1 62
{*m68k.md:1130}
     (nil))
(insn 271 270 272 2 (set (reg:QI 228)
        (reg:QI 227))
"/space/rguenther/src/gcc/gcc/testsuite/gcc.dg/torture/vshuf-main.inc":28:1 62
{*m68k.md:1130}
     (nil))
(insn 272 271 35 2 (set (subreg:QI (reg:SI 138 [orig:43 _26 ] [43]) 3)
        (reg:QI 228))
"/space/rguenther/src/gcc/gcc/testsuite/gcc.dg/torture/vshuf-main.inc":28:1 62
{*m68k.md:1130}
     (nil))

which is

(define_insn ""
  [(set (match_operand:QI 0 "nonimmediate_operand" "=d,*a,m")
    (match_operand:QI 1 "general_src_operand" "dmSi*a,di*a,dmSi"))]
  "!TARGET_COLDFIRE"
  "* return output_move_qimode (operands);"
  [(set_attr "flags_valid" "set")])

  271: r138:SI#3=r227:QI

         Considering alt=0 of insn 271:   (0) =d  (1) dmSi*a
            0 Super set class reg: reject-=3
            0 Non input pseudo reload: reject++
            1 Non pseudo reload: reject++
            Cycle danger: overall += LRA_MAX_REJECT
          overall=605,losers=1,rld_nregs=1
         Considering alt=1 of insn 271:   (0) *a  (1) di*a
            0 Super set class reg: reject-=3
            0 Costly loser: reject++
            0 Non input pseudo reload: reject++
            1 Non pseudo reload: reject++
          overall=6,losers=1,rld_nregs=1
         Considering alt=2 of insn 271:   (0) m  (1) dmSi
            Using memory insn operand 0: reject+=3
            0 Non input pseudo reload: reject++
            overall=10,losers=1 -- refuse
      Choosing alt 1 in insn 271:  (0) *a  (1) di*a {*m68k.md:1130}
      Creating newreg=228, assigning class ADDR_REGS to r228

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

* [Bug target/112918] [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90)
  2023-12-08 10:53 [Bug target/112918] New: [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90) schwab@linux-m68k.org
                   ` (7 preceding siblings ...)
  2023-12-11 10:12 ` rguenth at gcc dot gnu.org
@ 2023-12-11 10:29 ` rguenth at gcc dot gnu.org
  2023-12-11 10:44 ` rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-12-11 10:29 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
Bernd did the cc0 conversion, maybe he has some secret knowledge spotting the
main issue(s) with LRA.  Jeff as well, as expert-for-all-(weird)-targets ;)

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

* [Bug target/112918] [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90)
  2023-12-08 10:53 [Bug target/112918] New: [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90) schwab@linux-m68k.org
                   ` (8 preceding siblings ...)
  2023-12-11 10:29 ` rguenth at gcc dot gnu.org
@ 2023-12-11 10:44 ` rguenth at gcc dot gnu.org
  2023-12-12  9:41 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-12-11 10:44 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
So for that gcc.dg/torture/vshuf-v16qi.c testcase we seem to cycle through
reload alternatives of that

(define_insn ""
  [(set (match_operand:QI 0 "nonimmediate_operand" "=d,*a,m")
    (match_operand:QI 1 "general_src_operand" "dmSi*a,di*a,dmSi"))]
  "!TARGET_COLDFIRE"
  "* return output_move_qimode (operands);"
  [(set_attr "flags_valid" "set")])

pattern but after reloading we are always still not happy with it.
(we're swapping address reg for data reg and vice versa and so on)

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

* [Bug target/112918] [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90)
  2023-12-08 10:53 [Bug target/112918] New: [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90) schwab@linux-m68k.org
                   ` (9 preceding siblings ...)
  2023-12-11 10:44 ` rguenth at gcc dot gnu.org
@ 2023-12-12  9:41 ` rguenth at gcc dot gnu.org
  2023-12-15 20:17 ` vmakarov at gcc dot gnu.org
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-12-12  9:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
The original testcase fails with the same pattern btw., alternating between
register classes / alternatives.

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

* [Bug target/112918] [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90)
  2023-12-08 10:53 [Bug target/112918] New: [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90) schwab@linux-m68k.org
                   ` (10 preceding siblings ...)
  2023-12-12  9:41 ` rguenth at gcc dot gnu.org
@ 2023-12-15 20:17 ` vmakarov at gcc dot gnu.org
  2023-12-18 22:15 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2023-12-15 20:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
I've been working on the PR this week.  The problem for this case is in that
for subreg reload LRA can not narrow reg class more from ALL_REGS to
GENERAL_REGS and then to data regs or address regs.

The patch will be ready today but I am going to test it well and submit it on
Monday as it changes a sensitive part of LRA and might be risky.

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

* [Bug target/112918] [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90)
  2023-12-08 10:53 [Bug target/112918] New: [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90) schwab@linux-m68k.org
                   ` (11 preceding siblings ...)
  2023-12-15 20:17 ` vmakarov at gcc dot gnu.org
@ 2023-12-18 22:15 ` cvs-commit at gcc dot gnu.org
  2023-12-20  7:59 ` [Bug rtl-optimization/112918] " tschwinge at gcc dot gnu.org
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-12-18 22:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Vladimir Makarov <vmakarov@gcc.gnu.org>:

https://gcc.gnu.org/g:989e67f827b74b76e58abe137ce12d948af2290c

commit r14-6667-g989e67f827b74b76e58abe137ce12d948af2290c
Author: Vladimir N. Makarov <vmakarov@redhat.com>
Date:   Mon Dec 18 17:12:23 2023 -0500

    [PR112918][LRA]: Fixing IRA ICE on m68k

    Some GCC tests on m68K port of LRA is failed on `maximum number of
    generated reload insns per insn achieved`.  The problem is in that for
    subreg reload LRA can not narrow reg class more from ALL_REGS to
    GENERAL_REGS and then to data regs or address regs.  The patch permits
    narowing reg class from reload insns if this results in succesful
    matching of reg operand.

    gcc/ChangeLog:

            PR rtl-optimization/112918
            * lra-constraints.cc (SMALL_REGISTER_CLASS_P): Move before
in_class_p.
            (in_class_p): Restrict condition for narrowing class in case of
            allow_all_reload_class_changes_p.
            (process_alt_operands): Pass true for
            allow_all_reload_class_changes_p in calls of in_class_p.
            (curr_insn_transform): Ditto for reg operand win.

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

* [Bug rtl-optimization/112918] [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90)
  2023-12-08 10:53 [Bug target/112918] New: [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90) schwab@linux-m68k.org
                   ` (12 preceding siblings ...)
  2023-12-18 22:15 ` cvs-commit at gcc dot gnu.org
@ 2023-12-20  7:59 ` tschwinge at gcc dot gnu.org
  2023-12-21 14:46 ` vmakarov at gcc dot gnu.org
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2023-12-20  7:59 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Schwinge <tschwinge at gcc dot gnu.org> changed:

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

--- Comment #14 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
*** Bug 112265 has been marked as a duplicate of this bug. ***

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

* [Bug rtl-optimization/112918] [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90)
  2023-12-08 10:53 [Bug target/112918] New: [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90) schwab@linux-m68k.org
                   ` (13 preceding siblings ...)
  2023-12-20  7:59 ` [Bug rtl-optimization/112918] " tschwinge at gcc dot gnu.org
@ 2023-12-21 14:46 ` vmakarov at gcc dot gnu.org
  2023-12-21 15:14 ` tschwinge at gcc dot gnu.org
  2024-01-11 14:30 ` cvs-commit at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2023-12-21 14:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
The patch resulted in 2 new PRs about ICE when building glibc.  So I reverted
the patch.

I'll continue work on this PR right after the winter holidays.

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

* [Bug rtl-optimization/112918] [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90)
  2023-12-08 10:53 [Bug target/112918] New: [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90) schwab@linux-m68k.org
                   ` (14 preceding siblings ...)
  2023-12-21 14:46 ` vmakarov at gcc dot gnu.org
@ 2023-12-21 15:14 ` tschwinge at gcc dot gnu.org
  2024-01-11 14:30 ` cvs-commit at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2023-12-21 15:14 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Schwinge <tschwinge at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=113097,
                   |                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=113098
           Assignee|unassigned at gcc dot gnu.org      |vmakarov at gcc dot gnu.org

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

* [Bug rtl-optimization/112918] [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90)
  2023-12-08 10:53 [Bug target/112918] New: [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90) schwab@linux-m68k.org
                   ` (15 preceding siblings ...)
  2023-12-21 15:14 ` tschwinge at gcc dot gnu.org
@ 2024-01-11 14:30 ` cvs-commit at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-01-11 14:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Vladimir Makarov <vmakarov@gcc.gnu.org>:

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

commit r14-7141-ga729b6e002fe76208f33fdcdee49d6a310a1940e
Author: Vladimir N. Makarov <vmakarov@redhat.com>
Date:   Thu Jan 11 08:46:26 2024 -0500

    [PR112918][LRA]: Fixing IRA ICE on m68k

    Some GCC tests on m68K port of LRA is failed on `maximum number of
    generated reload insns per insn achieved`.  The problem is in that for
    subreg reload LRA can not narrow reg class more from ALL_REGS to
    GENERAL_REGS and then to data regs or address regs.  The patch permits
    narrowing reg class from reload insns if this results in successful
    matching of reg operand.  This is the second version of the patch to
    fix the PR.  This version adds matching with and without narrowing reg
    class and preferring match without narrowing classes.

    gcc/ChangeLog:

            PR rtl-optimization/112918
            * lra-constraints.cc (SMALL_REGISTER_CLASS_P): Move before
in_class_p.
            (in_class_p): Restrict condition for narrowing class in case of
            allow_all_reload_class_changes_p.
            (process_alt_operands): Try to match operand without and with
            narrowing reg class.  Discourage narrowing the class.  Finish insn
            matching only if there is no class narrowing.
            (curr_insn_transform): Pass true to in_class_p for reg operand win.

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

end of thread, other threads:[~2024-01-11 14:30 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-08 10:53 [Bug target/112918] New: [m68k] [LRA] ICE: maximum number of generated reload insns per insn achieved (90) schwab@linux-m68k.org
2023-12-08 13:07 ` [Bug target/112918] " rguenth at gcc dot gnu.org
2023-12-08 13:08 ` rguenth at gcc dot gnu.org
2023-12-08 13:32 ` schwab@linux-m68k.org
2023-12-08 13:36 ` schwab@linux-m68k.org
2023-12-08 14:30 ` schwab@linux-m68k.org
2023-12-08 19:34 ` schwab@linux-m68k.org
2023-12-08 19:37 ` schwab@linux-m68k.org
2023-12-11 10:12 ` rguenth at gcc dot gnu.org
2023-12-11 10:29 ` rguenth at gcc dot gnu.org
2023-12-11 10:44 ` rguenth at gcc dot gnu.org
2023-12-12  9:41 ` rguenth at gcc dot gnu.org
2023-12-15 20:17 ` vmakarov at gcc dot gnu.org
2023-12-18 22:15 ` cvs-commit at gcc dot gnu.org
2023-12-20  7:59 ` [Bug rtl-optimization/112918] " tschwinge at gcc dot gnu.org
2023-12-21 14:46 ` vmakarov at gcc dot gnu.org
2023-12-21 15:14 ` tschwinge at gcc dot gnu.org
2024-01-11 14:30 ` cvs-commit 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).