public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/99786] New: ICE in in extract_insn, at recog.c:2770
@ 2021-03-26  8:30 marxin at gcc dot gnu.org
  2021-03-26  8:31 ` [Bug target/99786] [11 Regression] " marxin at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-03-26  8:30 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99786
           Summary: ICE in in extract_insn, at recog.c:2770
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
  Target Milestone: ---
              Host: x86_64-linux-gnu
            Target: arm-linux-gnueabi

The following ICEs:

$ arm-linux-gnueabi-gcc
/home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/ubsan/pr79904.c -mcpu=iwmmxt
/home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/ubsan/pr79904.c: In function
‘foo’:
/home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/ubsan/pr79904.c:11:1: error:
unrecognizable insn:
   11 | }
      | ^
(insn 9 8 10 2 (set (reg:V8QI 114 [ _2 ])
        (mult:V8QI (reg:V8QI 113 [ _1 ])
            (reg:V8QI 116)))
"/home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/ubsan/pr79904.c":10:11 -1
     (nil))
during RTL pass: vregs
/home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/ubsan/pr79904.c:11:1:
internal compiler error: in extract_insn, at recog.c:2770
0x5fea13 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-arm/build/gcc/rtl-error.c:108
0x5fea2f _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-arm/build/gcc/rtl-error.c:116
0x5fdea6 extract_insn(rtx_insn*)
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-arm/build/gcc/recog.c:2770
0x89836f instantiate_virtual_regs_in_insn
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-arm/build/gcc/function.c:1609
0x89836f instantiate_virtual_regs
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-arm/build/gcc/function.c:1983
0x89836f execute
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-arm/build/gcc/function.c:2032
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] 8+ messages in thread

* [Bug target/99786] [11 Regression] ICE in in extract_insn, at recog.c:2770
  2021-03-26  8:30 [Bug target/99786] New: ICE in in extract_insn, at recog.c:2770 marxin at gcc dot gnu.org
@ 2021-03-26  8:31 ` marxin at gcc dot gnu.org
  2021-03-26  9:50 ` [Bug target/99786] [11 Regression] ICE in in extract_insn, at recog.c:2770 since r11-4199-g0f41b5e02fa47db2080b77e4e1f7cd3305457c05 rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-03-26  8:31 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |11.0
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
            Summary|ICE in in extract_insn, at  |[11 Regression] ICE in in
                   |recog.c:2770                |extract_insn, at
                   |                            |recog.c:2770
      Known to work|                            |10.2.0
   Last reconfirmed|                            |2021-03-26

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

* [Bug target/99786] [11 Regression] ICE in in extract_insn, at recog.c:2770 since r11-4199-g0f41b5e02fa47db2080b77e4e1f7cd3305457c05
  2021-03-26  8:30 [Bug target/99786] New: ICE in in extract_insn, at recog.c:2770 marxin at gcc dot gnu.org
  2021-03-26  8:31 ` [Bug target/99786] [11 Regression] " marxin at gcc dot gnu.org
@ 2021-03-26  9:50 ` rguenth at gcc dot gnu.org
  2021-03-26  9:51 ` clyon at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-03-26  9:50 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.0
           Priority|P3                          |P1

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

* [Bug target/99786] [11 Regression] ICE in in extract_insn, at recog.c:2770 since r11-4199-g0f41b5e02fa47db2080b77e4e1f7cd3305457c05
  2021-03-26  8:30 [Bug target/99786] New: ICE in in extract_insn, at recog.c:2770 marxin at gcc dot gnu.org
  2021-03-26  8:31 ` [Bug target/99786] [11 Regression] " marxin at gcc dot gnu.org
  2021-03-26  9:50 ` [Bug target/99786] [11 Regression] ICE in in extract_insn, at recog.c:2770 since r11-4199-g0f41b5e02fa47db2080b77e4e1f7cd3305457c05 rguenth at gcc dot gnu.org
@ 2021-03-26  9:51 ` clyon at gcc dot gnu.org
  2021-03-26 10:27 ` clyon at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: clyon at gcc dot gnu.org @ 2021-03-26  9:51 UTC (permalink / raw)
  To: gcc-bugs

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

Christophe Lyon <clyon at gcc dot gnu.org> changed:

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

--- Comment #1 from Christophe Lyon <clyon at gcc dot gnu.org> ---
Looks like a similar problem to PR99724 and PR98849.

IIUC, iwmmxt only supports mult:V4HI (see mulv4hi3_iwmmxt in iwmmxt.md), so the
condition ARM_HAVE_<MODE>_ARITH on define_expand "mul<mode>3" in vec-common.md
is not strict enough.

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

* [Bug target/99786] [11 Regression] ICE in in extract_insn, at recog.c:2770 since r11-4199-g0f41b5e02fa47db2080b77e4e1f7cd3305457c05
  2021-03-26  8:30 [Bug target/99786] New: ICE in in extract_insn, at recog.c:2770 marxin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-03-26  9:51 ` clyon at gcc dot gnu.org
@ 2021-03-26 10:27 ` clyon at gcc dot gnu.org
  2021-03-26 14:51 ` clyon at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: clyon at gcc dot gnu.org @ 2021-03-26 10:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Christophe Lyon <clyon at gcc dot gnu.org> ---
This fixes the ICE:
diff --git a/gcc/config/arm/vec-common.md b/gcc/config/arm/vec-common.md
index 48ee659..86563d9 100644
--- a/gcc/config/arm/vec-common.md
+++ b/gcc/config/arm/vec-common.md
@@ -103,7 +103,7 @@ (define_expand "mul<mode>3"
   [(set (match_operand:VDQWH 0 "s_register_operand")
        (mult:VDQWH (match_operand:VDQWH 1 "s_register_operand")
                    (match_operand:VDQWH 2 "s_register_operand")))]
-  "ARM_HAVE_<MODE>_ARITH"
+  "ARM_HAVE_<MODE>_ARITH && (!TARGET_REALLY_IWMMXT || <MODE>mode == V4HImode)"
 )


However, I am getting errors from the assembler:
pr79904.s:29: Error: selected processor does not support `wldrd wr0,[r3]' in
ARM mode
pr79904.s:30: Error: selected processor does not support `wldrd wr2,.L2' in ARM
mode
pr79904.s:31: Error: selected processor does not support `wmulul wr0,wr0,wr2'
in ARM mode
pr79904.s:33: Error: selected processor does not support `wstrd wr0,[r3]' in
ARM mode 

I am compiling with arm-eabi-gcc -mcpu=iwmmxt.

These errors are unrelated to the PR, but I am wondering why they appear?

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

* [Bug target/99786] [11 Regression] ICE in in extract_insn, at recog.c:2770 since r11-4199-g0f41b5e02fa47db2080b77e4e1f7cd3305457c05
  2021-03-26  8:30 [Bug target/99786] New: ICE in in extract_insn, at recog.c:2770 marxin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-03-26 10:27 ` clyon at gcc dot gnu.org
@ 2021-03-26 14:51 ` clyon at gcc dot gnu.org
  2021-03-31 13:50 ` cvs-commit at gcc dot gnu.org
  2021-03-31 13:53 ` clyon at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: clyon at gcc dot gnu.org @ 2021-03-26 14:51 UTC (permalink / raw)
  To: gcc-bugs

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

Christophe Lyon <clyon at gcc dot gnu.org> changed:

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

--- Comment #3 from Christophe Lyon <clyon at gcc dot gnu.org> ---
I'd like to submit the small patch I proposed in comment #2, but I have a
trouble writing a testcase that is accepted by the assembler as described.

The testcase would be the same as ubsan/pr79904.c, with the addition of V4HI
vectors.

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

* [Bug target/99786] [11 Regression] ICE in in extract_insn, at recog.c:2770 since r11-4199-g0f41b5e02fa47db2080b77e4e1f7cd3305457c05
  2021-03-26  8:30 [Bug target/99786] New: ICE in in extract_insn, at recog.c:2770 marxin at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2021-03-26 14:51 ` clyon at gcc dot gnu.org
@ 2021-03-31 13:50 ` cvs-commit at gcc dot gnu.org
  2021-03-31 13:53 ` clyon at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-31 13:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Christophe Lyon <clyon@gcc.gnu.org>:

https://gcc.gnu.org/g:7c1d6e89994109e1b6efb5f13890be5586edeb75

commit r11-7929-g7c1d6e89994109e1b6efb5f13890be5586edeb75
Author: Christophe Lyon <christophe.lyon@linaro.org>
Date:   Mon Mar 29 12:41:08 2021 +0000

    arm: Fix mult autovectorization patterm for iwmmxt (PR target/99786)

    Similarly to other recently-added autovectorization patterns, mult has
    been erroneously enabled for iwmmxt. However, V4HI and V2SI modes are
    supported, so we make an exception for them.

    The new testcase is derived from gcc.dg/ubsan/pr79904.c, with
    additional modes added.

    I kept dg-do compile because 'assemble' results in error messages from
    the assembler, which are not related to this PR:

    Error: selected processor does not support `tmcrr wr0,r4,r5' in ARM mode
    Error: selected processor does not support `wstrd wr0,[r0]' in ARM mode
    Error: selected processor does not support `wldrd wr0,[r0]' in ARM mode
    Error: selected processor does not support `wldrd wr2,.L5' in ARM mode
    Error: selected processor does not support `wmulul wr0,wr0,wr2' in ARM mode
    Error: selected processor does not support `wstrd wr0,[r0]' in ARM mode
    Error: selected processor does not support `wldrd wr0,[r0]' in ARM mode
    Error: selected processor does not support `wldrd wr2,.L8' in ARM mode
    Error: selected processor does not support `wmulwl wr0,wr0,wr2' in ARM mode
    Error: selected processor does not support `wstrd wr0,[r0]' in ARM mode

    2021-03-29  Christophe Lyon  <christophe.lyon@linaro.org>

            PR target/99786

            gcc/
            * config/arm/vec-common.md (mul<mode>3): Disable on iwMMXT, expect
            for V4HI and V2SI.

            gcc/testsuite/
            * gcc.target/arm/pr99786.c: New test.

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

* [Bug target/99786] [11 Regression] ICE in in extract_insn, at recog.c:2770 since r11-4199-g0f41b5e02fa47db2080b77e4e1f7cd3305457c05
  2021-03-26  8:30 [Bug target/99786] New: ICE in in extract_insn, at recog.c:2770 marxin at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2021-03-31 13:50 ` cvs-commit at gcc dot gnu.org
@ 2021-03-31 13:53 ` clyon at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: clyon at gcc dot gnu.org @ 2021-03-31 13:53 UTC (permalink / raw)
  To: gcc-bugs

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

Christophe Lyon <clyon at gcc dot gnu.org> changed:

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

--- Comment #5 from Christophe Lyon <clyon at gcc dot gnu.org> ---
Fixed

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

end of thread, other threads:[~2021-03-31 13:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-26  8:30 [Bug target/99786] New: ICE in in extract_insn, at recog.c:2770 marxin at gcc dot gnu.org
2021-03-26  8:31 ` [Bug target/99786] [11 Regression] " marxin at gcc dot gnu.org
2021-03-26  9:50 ` [Bug target/99786] [11 Regression] ICE in in extract_insn, at recog.c:2770 since r11-4199-g0f41b5e02fa47db2080b77e4e1f7cd3305457c05 rguenth at gcc dot gnu.org
2021-03-26  9:51 ` clyon at gcc dot gnu.org
2021-03-26 10:27 ` clyon at gcc dot gnu.org
2021-03-26 14:51 ` clyon at gcc dot gnu.org
2021-03-31 13:50 ` cvs-commit at gcc dot gnu.org
2021-03-31 13:53 ` clyon 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).