public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/99724] New: [11 Regression] CE in in extract_insn, at recog.c:2770
@ 2021-03-23 10:25 marxin at gcc dot gnu.org
  2021-03-23 10:35 ` [Bug target/99724] " rguenth at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-03-23 10:25 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99724
           Summary: [11 Regression] CE 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 causes an ICE:

$ arm-linux-gnueabi-gcc
/home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/fold-minus-1.c -mcpu=iwmmxt2
/home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/fold-minus-1.c: In function
‘g’:
/home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/fold-minus-1.c:13:1: error:
unrecognizable insn:
   13 | }
      | ^
(insn 10 9 11 2 (set (reg:V2SI 114 [ _2 ])
        (not:V2SI (reg:V2SI 113 [ _1 ])))
"/home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/fold-minus-1.c":10:11 -1
     (nil))
during RTL pass: vregs
/home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/fold-minus-1.c:13:1: internal
compiler error: in extract_insn, at recog.c:2770

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

* [Bug target/99724] [11 Regression] CE in in extract_insn, at recog.c:2770
  2021-03-23 10:25 [Bug target/99724] New: [11 Regression] CE in in extract_insn, at recog.c:2770 marxin at gcc dot gnu.org
@ 2021-03-23 10:35 ` rguenth at gcc dot gnu.org
  2021-03-23 13:09 ` rearnsha at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-03-23 10:35 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.0

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

* [Bug target/99724] [11 Regression] CE in in extract_insn, at recog.c:2770
  2021-03-23 10:25 [Bug target/99724] New: [11 Regression] CE in in extract_insn, at recog.c:2770 marxin at gcc dot gnu.org
  2021-03-23 10:35 ` [Bug target/99724] " rguenth at gcc dot gnu.org
@ 2021-03-23 13:09 ` rearnsha at gcc dot gnu.org
  2021-03-23 13:22 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rearnsha at gcc dot gnu.org @ 2021-03-23 13:09 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Earnshaw <rearnsha at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-03-23
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #1 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
r11-5989 is the likely culprit.  It introduced one_cmpl<mode>2 for neon and mve
under a common framework.

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

* [Bug target/99724] [11 Regression] CE in in extract_insn, at recog.c:2770
  2021-03-23 10:25 [Bug target/99724] New: [11 Regression] CE in in extract_insn, at recog.c:2770 marxin at gcc dot gnu.org
  2021-03-23 10:35 ` [Bug target/99724] " rguenth at gcc dot gnu.org
  2021-03-23 13:09 ` rearnsha at gcc dot gnu.org
@ 2021-03-23 13:22 ` jakub at gcc dot gnu.org
  2021-03-23 13:37 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-03-23 13:22 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Indeed, bisected it to that r11-5989-gfd43603414a9b7bdbac5a822af144dcd559733eb
commit.
And
--- gcc/config/arm/vec-common.md.jj     2021-03-23 10:21:07.096448805 +0100
+++ gcc/config/arm/vec-common.md        2021-03-23 14:18:43.916347335 +0100
@@ -202,7 +202,7 @@ (define_expand "xor<mode>3"
 (define_expand "one_cmpl<mode>2"
   [(set (match_operand:VDQ 0 "s_register_operand")
        (not:VDQ (match_operand:VDQ 1 "s_register_operand")))]
-  "ARM_HAVE_<MODE>_ARITH"
+  "ARM_HAVE_<MODE>_ARITH && !TARGET_REALLY_IWMMXT"
 )

 (define_expand "neg<mode>2"
fixes it.  I just have to wonder how many other expanders have the similar
problem though.

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

* [Bug target/99724] [11 Regression] CE in in extract_insn, at recog.c:2770
  2021-03-23 10:25 [Bug target/99724] New: [11 Regression] CE in in extract_insn, at recog.c:2770 marxin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-03-23 13:22 ` jakub at gcc dot gnu.org
@ 2021-03-23 13:37 ` jakub at gcc dot gnu.org
  2021-03-23 13:57 ` clyon at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-03-23 13:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
E.g. I can't find a neg pattern in iwmmxt.md either, so
r11-5990-g4cbb7cab47a3b91a12ad52baab5bbe6e4373ce73
is problematic too.
And r11-6616-g25bef68902f42f414f99626cefb2d3df81de7dc8 too (don't see any
UNSPEC_MISALIGNED_ACCESS in iwmmxt.md either.
and/ior/xor is, so that is likely ok.
So
--- gcc/config/arm/vec-common.md.jj     2021-03-23 10:21:07.096448805 +0100
+++ gcc/config/arm/vec-common.md        2021-03-23 14:36:54.823323029 +0100
@@ -202,13 +202,13 @@ (define_expand "xor<mode>3"
 (define_expand "one_cmpl<mode>2"
   [(set (match_operand:VDQ 0 "s_register_operand")
        (not:VDQ (match_operand:VDQ 1 "s_register_operand")))]
-  "ARM_HAVE_<MODE>_ARITH"
+  "ARM_HAVE_<MODE>_ARITH && !TARGET_REALLY_IWMMXT"
 )

 (define_expand "neg<mode>2"
   [(set (match_operand:VDQWH 0 "s_register_operand" "")
        (neg:VDQWH (match_operand:VDQWH 1 "s_register_operand" "")))]
-  "ARM_HAVE_<MODE>_ARITH"
+  "ARM_HAVE_<MODE>_ARITH && !TARGER_REALLY_IWMMXT"
 )

 (define_expand "cadd<rot><mode>3"
@@ -281,7 +281,8 @@ (define_expand "movmisalign<mode>"
  [(set (match_operand:VDQX 0 "neon_perm_struct_or_reg_operand")
        (unspec:VDQX [(match_operand:VDQX 1 "neon_perm_struct_or_reg_operand")]
         UNSPEC_MISALIGNED_ACCESS))]
- "ARM_HAVE_<MODE>_LDST && !BYTES_BIG_ENDIAN && unaligned_access"
+ "ARM_HAVE_<MODE>_LDST && !BYTES_BIG_ENDIAN
+  && unaligned_access && !TARGET_REALLY_IWMMXT"
 {
  rtx adjust_mem;
  /* This pattern is not permitted to fail during expansion: if both arguments
instead?

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

* [Bug target/99724] [11 Regression] CE in in extract_insn, at recog.c:2770
  2021-03-23 10:25 [Bug target/99724] New: [11 Regression] CE in in extract_insn, at recog.c:2770 marxin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-03-23 13:37 ` jakub at gcc dot gnu.org
@ 2021-03-23 13:57 ` clyon at gcc dot gnu.org
  2021-03-23 19:49 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: clyon at gcc dot gnu.org @ 2021-03-23 13:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Christophe Lyon <clyon at gcc dot gnu.org> ---
Oops sorry, indeed it's likely that several of my other patches in this area
introduced the same problem. I did lots of 'make check' though, too bad iwmmxt
isn't covered well.

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

* [Bug target/99724] [11 Regression] CE in in extract_insn, at recog.c:2770
  2021-03-23 10:25 [Bug target/99724] New: [11 Regression] CE in in extract_insn, at recog.c:2770 marxin at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2021-03-23 13:57 ` clyon at gcc dot gnu.org
@ 2021-03-23 19:49 ` jakub at gcc dot gnu.org
  2021-03-23 21:19 ` clyon at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-03-23 19:49 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 50465
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50465&action=edit
gcc11-pr99724.patch

Full patch I'm going to bootstrap/regtest.

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

* [Bug target/99724] [11 Regression] CE in in extract_insn, at recog.c:2770
  2021-03-23 10:25 [Bug target/99724] New: [11 Regression] CE in in extract_insn, at recog.c:2770 marxin at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2021-03-23 19:49 ` jakub at gcc dot gnu.org
@ 2021-03-23 21:19 ` clyon at gcc dot gnu.org
  2021-03-24 10:23 ` cvs-commit at gcc dot gnu.org
  2021-03-24 10:24 ` jakub at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: clyon at gcc dot gnu.org @ 2021-03-23 21:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Christophe Lyon <clyon at gcc dot gnu.org> ---
Looks good to me, thanks

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

* [Bug target/99724] [11 Regression] CE in in extract_insn, at recog.c:2770
  2021-03-23 10:25 [Bug target/99724] New: [11 Regression] CE in in extract_insn, at recog.c:2770 marxin at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2021-03-23 21:19 ` clyon at gcc dot gnu.org
@ 2021-03-24 10:23 ` cvs-commit at gcc dot gnu.org
  2021-03-24 10:24 ` jakub at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-24 10:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:4f992de4f369e17b64a66246ec35bf75f41dc98d

commit r11-7814-g4f992de4f369e17b64a66246ec35bf75f41dc98d
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Wed Mar 24 11:22:35 2021 +0100

    arm: Fix some more vec-common.md patterns for iwmmxt [PR99724]

    The following patch fixes similar issues as in PR98849;
    in older gcc versions, the expanders were present in neon.md guarded
    with TARGET_NEON, but they got moved to vec-common.md and guarded with
    ARM_HAVE_<MODE>_ARITH so that they handle both MVE and Neon.
    The macros are enabled for some modes even for iwmmxt which has some
    vector support for those modes, but only limited.  In particular,
    neither the one_cmpl, nor neg, nor movmisalign patterns are present.
    For some reason I've failed to construct something that ICEs with
    movmisalign, so that is not covered by the testsuite, but both
    one_cmpl and neg ICE.

    2021-03-24  Jakub Jelinek  <jakub@redhat.com>

            PR target/99724
            * config/arm/vec-common.md (one_cmpl<mode>2, neg<mode>2,
            movmisalign<mode>): Disable expanders for TARGET_REALLY_IWMMXT.

            * gcc.target/arm/pr99724.c: New test.

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

* [Bug target/99724] [11 Regression] CE in in extract_insn, at recog.c:2770
  2021-03-23 10:25 [Bug target/99724] New: [11 Regression] CE in in extract_insn, at recog.c:2770 marxin at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2021-03-24 10:23 ` cvs-commit at gcc dot gnu.org
@ 2021-03-24 10:24 ` jakub at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-03-24 10:24 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

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

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2021-03-24 10:24 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-23 10:25 [Bug target/99724] New: [11 Regression] CE in in extract_insn, at recog.c:2770 marxin at gcc dot gnu.org
2021-03-23 10:35 ` [Bug target/99724] " rguenth at gcc dot gnu.org
2021-03-23 13:09 ` rearnsha at gcc dot gnu.org
2021-03-23 13:22 ` jakub at gcc dot gnu.org
2021-03-23 13:37 ` jakub at gcc dot gnu.org
2021-03-23 13:57 ` clyon at gcc dot gnu.org
2021-03-23 19:49 ` jakub at gcc dot gnu.org
2021-03-23 21:19 ` clyon at gcc dot gnu.org
2021-03-24 10:23 ` cvs-commit at gcc dot gnu.org
2021-03-24 10:24 ` jakub 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).