public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/97540] New: [11 Regression] ICE in lra_set_insn_recog_data, at lra.c:1004 since r11-4202-g4de7b010038933dd
@ 2020-10-23  8:04 marxin at gcc dot gnu.org
  2020-10-23  8:04 ` [Bug rtl-optimization/97540] " marxin at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-10-23  8:04 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97540
           Summary: [11 Regression] ICE in lra_set_insn_recog_data, at
                    lra.c:1004 since r11-4202-g4de7b010038933dd
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: hjl at gcc dot gnu.org
  Target Milestone: ---

The following fails, it's reduced from linux kernel:

$ cat mediatek.i
int mt7615_add_interface_dev_0;
int ffs(int x) { asm("" : : "rm"(x)); }
int mt7615_add_interface() { ffs(~mt7615_add_interface_dev_0); }

$ gcc mediatek.i -c -O2
during RTL pass: reload
mediatek.i: In function ‘mt7615_add_interface’:
mediatek.i:3:64: internal compiler error: in lra_set_insn_recog_data, at
lra.c:1004
    3 | int mt7615_add_interface() { ffs(~mt7615_add_interface_dev_0); }
      |                                                                ^
0x6a2457 lra_set_insn_recog_data(rtx_insn*)
        /home/marxin/Programming/gcc/gcc/lra.c:1004
0xc2434f lra_get_insn_recog_data
        /home/marxin/Programming/gcc/gcc/lra-int.h:488
0xc2434f remove_scratches_1
        /home/marxin/Programming/gcc/gcc/lra.c:2064
0xc244a3 lra_emit_move(rtx_def*, rtx_def*)
        /home/marxin/Programming/gcc/gcc/lra.c:506
0xc368c6 curr_insn_transform
        /home/marxin/Programming/gcc/gcc/lra-constraints.c:4523
0xc37db6 lra_constraints(bool)
        /home/marxin/Programming/gcc/gcc/lra-constraints.c:5123
0xc24d8c lra(_IO_FILE*)
        /home/marxin/Programming/gcc/gcc/lra.c:2415
0xbe0171 do_reload
        /home/marxin/Programming/gcc/gcc/ira.c:5529
0xbe0171 execute
        /home/marxin/Programming/gcc/gcc/ira.c:5715
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.

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

* [Bug rtl-optimization/97540] [11 Regression] ICE in lra_set_insn_recog_data, at lra.c:1004 since r11-4202-g4de7b010038933dd
  2020-10-23  8:04 [Bug rtl-optimization/97540] New: [11 Regression] ICE in lra_set_insn_recog_data, at lra.c:1004 since r11-4202-g4de7b010038933dd marxin at gcc dot gnu.org
@ 2020-10-23  8:04 ` marxin at gcc dot gnu.org
  2020-10-23 11:47 ` rguenth at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-10-23  8:04 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
             Status|UNCONFIRMED                 |NEW
   Target Milestone|---                         |11.0
     Ever confirmed|0                           |1
      Known to work|                            |10.2.0
   Last reconfirmed|                            |2020-10-23
      Known to fail|                            |11.0

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

* [Bug rtl-optimization/97540] [11 Regression] ICE in lra_set_insn_recog_data, at lra.c:1004 since r11-4202-g4de7b010038933dd
  2020-10-23  8:04 [Bug rtl-optimization/97540] New: [11 Regression] ICE in lra_set_insn_recog_data, at lra.c:1004 since r11-4202-g4de7b010038933dd marxin at gcc dot gnu.org
  2020-10-23  8:04 ` [Bug rtl-optimization/97540] " marxin at gcc dot gnu.org
@ 2020-10-23 11:47 ` rguenth at gcc dot gnu.org
  2020-10-23 14:01 ` crazylht at gmail dot com
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-10-23 11:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
target?

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

* [Bug rtl-optimization/97540] [11 Regression] ICE in lra_set_insn_recog_data, at lra.c:1004 since r11-4202-g4de7b010038933dd
  2020-10-23  8:04 [Bug rtl-optimization/97540] New: [11 Regression] ICE in lra_set_insn_recog_data, at lra.c:1004 since r11-4202-g4de7b010038933dd marxin at gcc dot gnu.org
  2020-10-23  8:04 ` [Bug rtl-optimization/97540] " marxin at gcc dot gnu.org
  2020-10-23 11:47 ` rguenth at gcc dot gnu.org
@ 2020-10-23 14:01 ` crazylht at gmail dot com
  2020-10-26 19:30 ` dcb314 at hotmail dot com
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: crazylht at gmail dot com @ 2020-10-23 14:01 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Hongtao.liu <crazylht at gmail dot com> ---
2588           /* For special_memory_operand, there could be a memory operand
inside,
2589              and it would cause a mismatch for constraint_satisfied_p.  */
2590           if (UNARY_P (op) && op == extract_mem_from_operand (op))
2591             op = XEXP (op, 0);

the upper code is supposed to only prevent special_memory_constraint, but
mistakenly handled below insn.

(insn 7 6 10 2 (parallel [
            (asm_operands/v ("") ("") 0 [
                    (not:SI (mem/c:SI (symbol_ref:DI
("mt7615_add_interface_dev_0") [flags 0x2]  <var_decl 0x7f623bcccb40
mt7615_add_interface_dev_0>) [1 mt7615_add_interface_dev_0+0 S4 A32]))
                ]
                 [
                    (asm_input:SI ("rm") test.c:2)
                ]
                 [] test.c:2)
            (clobber (reg:CC 17 flags))
        ]) "test.c":2:18 -1
     (expr_list:REG_UNUSED (reg:CC 17 flags)
        (nil)))

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

* [Bug rtl-optimization/97540] [11 Regression] ICE in lra_set_insn_recog_data, at lra.c:1004 since r11-4202-g4de7b010038933dd
  2020-10-23  8:04 [Bug rtl-optimization/97540] New: [11 Regression] ICE in lra_set_insn_recog_data, at lra.c:1004 since r11-4202-g4de7b010038933dd marxin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-10-23 14:01 ` crazylht at gmail dot com
@ 2020-10-26 19:30 ` dcb314 at hotmail dot com
  2020-10-27  6:05 ` crazylht at gmail dot com
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dcb314 at hotmail dot com @ 2020-10-26 19:30 UTC (permalink / raw)
  To: gcc-bugs

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

David Binderman <dcb314 at hotmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dcb314 at hotmail dot com

--- Comment #3 from David Binderman <dcb314 at hotmail dot com> ---
Probably related:

struct {
  struct {
    int b
  }
} c;
a(e) { asm("" : : "rm"(e)); }
d() { a(~c.b); }

Flag -O1 required. Goes wrong sometime between 20201021
and 20201022.

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

* [Bug rtl-optimization/97540] [11 Regression] ICE in lra_set_insn_recog_data, at lra.c:1004 since r11-4202-g4de7b010038933dd
  2020-10-23  8:04 [Bug rtl-optimization/97540] New: [11 Regression] ICE in lra_set_insn_recog_data, at lra.c:1004 since r11-4202-g4de7b010038933dd marxin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2020-10-26 19:30 ` dcb314 at hotmail dot com
@ 2020-10-27  6:05 ` crazylht at gmail dot com
  2020-10-30  0:52 ` crazylht at gmail dot com
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: crazylht at gmail dot com @ 2020-10-27  6:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Hongtao.liu <crazylht at gmail dot com> ---
Created attachment 49445
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49445&action=edit
Don't extract memory from operand for normal memory constraint.

I'm testing this patch.

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

* [Bug rtl-optimization/97540] [11 Regression] ICE in lra_set_insn_recog_data, at lra.c:1004 since r11-4202-g4de7b010038933dd
  2020-10-23  8:04 [Bug rtl-optimization/97540] New: [11 Regression] ICE in lra_set_insn_recog_data, at lra.c:1004 since r11-4202-g4de7b010038933dd marxin at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2020-10-27  6:05 ` crazylht at gmail dot com
@ 2020-10-30  0:52 ` crazylht at gmail dot com
  2020-11-02  9:05 ` marxin at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: crazylht at gmail dot com @ 2020-10-30  0:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Hongtao.liu <crazylht at gmail dot com> ---
The patch is posted at
https://gcc.gnu.org/pipermail/gcc-patches/2020-October/557143.html

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

* [Bug rtl-optimization/97540] [11 Regression] ICE in lra_set_insn_recog_data, at lra.c:1004 since r11-4202-g4de7b010038933dd
  2020-10-23  8:04 [Bug rtl-optimization/97540] New: [11 Regression] ICE in lra_set_insn_recog_data, at lra.c:1004 since r11-4202-g4de7b010038933dd marxin at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2020-10-30  0:52 ` crazylht at gmail dot com
@ 2020-11-02  9:05 ` marxin at gcc dot gnu.org
  2020-11-02 11:13 ` crazylht at gmail dot com
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-11-02  9:05 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |huntazhang at tencent dot com

--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
*** Bug 97667 has been marked as a duplicate of this bug. ***

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

* [Bug rtl-optimization/97540] [11 Regression] ICE in lra_set_insn_recog_data, at lra.c:1004 since r11-4202-g4de7b010038933dd
  2020-10-23  8:04 [Bug rtl-optimization/97540] New: [11 Regression] ICE in lra_set_insn_recog_data, at lra.c:1004 since r11-4202-g4de7b010038933dd marxin at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2020-11-02  9:05 ` marxin at gcc dot gnu.org
@ 2020-11-02 11:13 ` crazylht at gmail dot com
  2020-11-04  5:07 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: crazylht at gmail dot com @ 2020-11-02 11:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to Hongtao.liu from comment #5)
> The patch is posted at
> https://gcc.gnu.org/pipermail/gcc-patches/2020-October/557143.html

With upper patch and
https://gcc.gnu.org/pipermail/gcc-patches/2020-October/557142.html in pr97532,
successfully build and boot linux-kernel 5.9.2.

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

* [Bug rtl-optimization/97540] [11 Regression] ICE in lra_set_insn_recog_data, at lra.c:1004 since r11-4202-g4de7b010038933dd
  2020-10-23  8:04 [Bug rtl-optimization/97540] New: [11 Regression] ICE in lra_set_insn_recog_data, at lra.c:1004 since r11-4202-g4de7b010038933dd marxin at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2020-11-02 11:13 ` crazylht at gmail dot com
@ 2020-11-04  5:07 ` cvs-commit at gcc dot gnu.org
  2020-11-04  5:13 ` crazylht at gmail dot com
  2020-12-04 14:10 ` marxin at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-11-04  5:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by hongtao Liu <liuhongt@gcc.gnu.org>:

https://gcc.gnu.org/g:2e0aa43fc6ae689c595902310baec604e7e0d695

commit r11-4704-g2e0aa43fc6ae689c595902310baec604e7e0d695
Author: liuhongt <hongtao.liu@intel.com>
Date:   Mon Oct 26 20:46:42 2020 +0800

    Don't extract memory from operand for normal memory constraint.

    gcc/ChangeLog
            PR target/97540
            * ira.c: (ira_setup_alts): Extract memory from operand only
            for special memory constraint.
            * recog.c (asm_operand_ok): Ditto.
            * lra-constraints.c (process_alt_operands): MEM_P is
            required for normal memory constraint.

    gcc/testsuite/ChangeLog
            * gcc.target/i386/pr97540.c: New test.

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

* [Bug rtl-optimization/97540] [11 Regression] ICE in lra_set_insn_recog_data, at lra.c:1004 since r11-4202-g4de7b010038933dd
  2020-10-23  8:04 [Bug rtl-optimization/97540] New: [11 Regression] ICE in lra_set_insn_recog_data, at lra.c:1004 since r11-4202-g4de7b010038933dd marxin at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2020-11-04  5:07 ` cvs-commit at gcc dot gnu.org
@ 2020-11-04  5:13 ` crazylht at gmail dot com
  2020-12-04 14:10 ` marxin at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: crazylht at gmail dot com @ 2020-11-04  5:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Hongtao.liu <crazylht at gmail dot com> ---
Fixed in GCC11.

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

* [Bug rtl-optimization/97540] [11 Regression] ICE in lra_set_insn_recog_data, at lra.c:1004 since r11-4202-g4de7b010038933dd
  2020-10-23  8:04 [Bug rtl-optimization/97540] New: [11 Regression] ICE in lra_set_insn_recog_data, at lra.c:1004 since r11-4202-g4de7b010038933dd marxin at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2020-11-04  5:13 ` crazylht at gmail dot com
@ 2020-12-04 14:10 ` marxin at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-12-04 14:10 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

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

--- Comment #10 from Martin Liška <marxin at gcc dot gnu.org> ---
Then it's fixed.

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

end of thread, other threads:[~2020-12-04 14:10 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-23  8:04 [Bug rtl-optimization/97540] New: [11 Regression] ICE in lra_set_insn_recog_data, at lra.c:1004 since r11-4202-g4de7b010038933dd marxin at gcc dot gnu.org
2020-10-23  8:04 ` [Bug rtl-optimization/97540] " marxin at gcc dot gnu.org
2020-10-23 11:47 ` rguenth at gcc dot gnu.org
2020-10-23 14:01 ` crazylht at gmail dot com
2020-10-26 19:30 ` dcb314 at hotmail dot com
2020-10-27  6:05 ` crazylht at gmail dot com
2020-10-30  0:52 ` crazylht at gmail dot com
2020-11-02  9:05 ` marxin at gcc dot gnu.org
2020-11-02 11:13 ` crazylht at gmail dot com
2020-11-04  5:07 ` cvs-commit at gcc dot gnu.org
2020-11-04  5:13 ` crazylht at gmail dot com
2020-12-04 14:10 ` marxin 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).