public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/104779] New: [12 Regression] ICE: in extract_insn, at recog.cc:2769 (error: unrecognizable insn)
@ 2022-03-04  8:36 asolokha at gmx dot com
  2022-03-04  9:42 ` [Bug target/104779] " pinskia at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: asolokha at gmx dot com @ 2022-03-04  8:36 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104779
           Summary: [12 Regression] ICE: in extract_insn, at recog.cc:2769
                    (error: unrecognizable insn)
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---
            Target: x86_64-pc-linux-gnu

gcc 12.0.1 20220227 snapshot (g:d1574a9b820f17adb9004255e2018967e9be063b) ICEs
when compiling the following testcase w/ -O1 --param
sccvn-max-alias-queries-per-access=0:

__attribute__ ((simd)) int
foo (int x, int y, int z)
{
  return (x & y) * !!z;
}

% x86_64-pc-linux-gnu-gcc-12.0.1 -O1 --param
sccvn-max-alias-queries-per-access=0 -c yumxsqtg.c
yumxsqtg.c: In function 'foo.simdclone.6':
yumxsqtg.c:5:1: error: unrecognizable insn:
    5 | }
      | ^
(insn 14 13 18 2 (set (reg:V16SI 85 [ <retval> ])
        (vec_merge:V16SI (and:V16SI (mem/c:V16SI (plus:DI (reg/f:DI 77
virtual-stack-vars)
                        (const_int -128 [0xffffffffffffff80])) [0 MEM
<vector(16) int> [(int *)&y.57]+0 S64 A512])
                (mem/c:V16SI (plus:DI (reg/f:DI 77 virtual-stack-vars)
                        (const_int -192 [0xffffffffffffff40])) [0 MEM
<vector(16) int> [(int *)&x.56]+0 S64 A512]))
            (const_vector:V16SI [
                    (const_int 0 [0]) repeated x16
                ])
            (reg:HI 91 [ mask__5.187 ]))) -1
     (nil))
during RTL pass: vregs
yumxsqtg.c:5:1: internal compiler error: in extract_insn, at recog.cc:2769
0x71bfd7 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
       
/var/tmp/portage/sys-devel/gcc-12.0.1_p20220227/work/gcc-12-20220227/gcc/rtl-error.cc:108
0x71bff3 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
       
/var/tmp/portage/sys-devel/gcc-12.0.1_p20220227/work/gcc-12-20220227/gcc/rtl-error.cc:116
0x71a5ed extract_insn(rtx_insn*)
       
/var/tmp/portage/sys-devel/gcc-12.0.1_p20220227/work/gcc-12-20220227/gcc/recog.cc:2769
0xb65c6b instantiate_virtual_regs_in_insn
       
/var/tmp/portage/sys-devel/gcc-12.0.1_p20220227/work/gcc-12-20220227/gcc/function.cc:1611
0xb65c6b instantiate_virtual_regs
       
/var/tmp/portage/sys-devel/gcc-12.0.1_p20220227/work/gcc-12-20220227/gcc/function.cc:1985
0xb65c6b execute
       
/var/tmp/portage/sys-devel/gcc-12.0.1_p20220227/work/gcc-12-20220227/gcc/function.cc:2034

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

* [Bug target/104779] [12 Regression] ICE: in extract_insn, at recog.cc:2769 (error: unrecognizable insn)
  2022-03-04  8:36 [Bug rtl-optimization/104779] New: [12 Regression] ICE: in extract_insn, at recog.cc:2769 (error: unrecognizable insn) asolokha at gmx dot com
@ 2022-03-04  9:42 ` pinskia at gcc dot gnu.org
  2022-03-04  9:42 ` pinskia at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-03-04  9:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
You might be able to make a gimple testcase which starts right before expand.

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

* [Bug target/104779] [12 Regression] ICE: in extract_insn, at recog.cc:2769 (error: unrecognizable insn)
  2022-03-04  8:36 [Bug rtl-optimization/104779] New: [12 Regression] ICE: in extract_insn, at recog.cc:2769 (error: unrecognizable insn) asolokha at gmx dot com
  2022-03-04  9:42 ` [Bug target/104779] " pinskia at gcc dot gnu.org
@ 2022-03-04  9:42 ` pinskia at gcc dot gnu.org
  2022-03-04  9:50 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-03-04  9:42 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.0

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

* [Bug target/104779] [12 Regression] ICE: in extract_insn, at recog.cc:2769 (error: unrecognizable insn)
  2022-03-04  8:36 [Bug rtl-optimization/104779] New: [12 Regression] ICE: in extract_insn, at recog.cc:2769 (error: unrecognizable insn) asolokha at gmx dot com
  2022-03-04  9:42 ` [Bug target/104779] " pinskia at gcc dot gnu.org
  2022-03-04  9:42 ` pinskia at gcc dot gnu.org
@ 2022-03-04  9:50 ` jakub at gcc dot gnu.org
  2022-03-04 12:05 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-03-04  9:50 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
           Priority|P3                          |P1
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-03-04
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r12-2753-gc16f21c7cf97ce48967e42d3b5d22ea169a9c2c8

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

* [Bug target/104779] [12 Regression] ICE: in extract_insn, at recog.cc:2769 (error: unrecognizable insn)
  2022-03-04  8:36 [Bug rtl-optimization/104779] New: [12 Regression] ICE: in extract_insn, at recog.cc:2769 (error: unrecognizable insn) asolokha at gmx dot com
                   ` (2 preceding siblings ...)
  2022-03-04  9:50 ` jakub at gcc dot gnu.org
@ 2022-03-04 12:05 ` jakub at gcc dot gnu.org
  2022-03-04 13:14 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-03-04 12:05 UTC (permalink / raw)
  To: gcc-bugs

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

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 #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The bug is that nothing calls ix86_fixup_binary_operands_no_copy on it.
Now, either we can call it in the new cond_ expander, or better follow what
other spots do and have just define_insn * with ix86_binary_operator_ok even
for the mask cases and add define_expand that calls
ix86_fixup_binary_operands_no_copy.

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

* [Bug target/104779] [12 Regression] ICE: in extract_insn, at recog.cc:2769 (error: unrecognizable insn)
  2022-03-04  8:36 [Bug rtl-optimization/104779] New: [12 Regression] ICE: in extract_insn, at recog.cc:2769 (error: unrecognizable insn) asolokha at gmx dot com
                   ` (3 preceding siblings ...)
  2022-03-04 12:05 ` jakub at gcc dot gnu.org
@ 2022-03-04 13:14 ` jakub at gcc dot gnu.org
  2022-03-07  8:41 ` cvs-commit at gcc dot gnu.org
  2022-03-07  8:51 ` jakub at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-03-04 13:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 52561
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52561&action=edit
gcc12-pr104779.patch

Untested fix.

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

* [Bug target/104779] [12 Regression] ICE: in extract_insn, at recog.cc:2769 (error: unrecognizable insn)
  2022-03-04  8:36 [Bug rtl-optimization/104779] New: [12 Regression] ICE: in extract_insn, at recog.cc:2769 (error: unrecognizable insn) asolokha at gmx dot com
                   ` (4 preceding siblings ...)
  2022-03-04 13:14 ` jakub at gcc dot gnu.org
@ 2022-03-07  8:41 ` cvs-commit at gcc dot gnu.org
  2022-03-07  8:51 ` jakub at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-03-07  8:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 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:3bd11f791e08a5676f176d632c729d147f12dcaa

commit r12-7509-g3bd11f791e08a5676f176d632c729d147f12dcaa
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Mon Mar 7 09:40:51 2022 +0100

    i386: Fix up cond_{and,ior,xor,mul}* [PR104779]

    The following testcase ICEs, because the cond_andv* expander
    has vector_operand predicates in both of the commutative inputs
    and calls gen_andv*_mask which calls ix86_binary_operator_ok
    in its condition, but nothing calls ix86_fixup_binary_operands_no_copy
    during the expansion, which means cond_* accepts even operands
    like 2 MEMs which then can't be matched.

    The following patch handles it like most other insns that the other
    cond_* patterns use - by having a separate define_expand that calls
    ix86_fixup_binary_operands_no_copy and define_ins with
    ix86_binary_operator_ok.

    2022-03-07  Jakub Jelinek  <jakub@redhat.com>

            PR target/104779
            * config/i386/sse.md (avx512dq_mul<mode>3<mask_name>): New
            define_expand pattern.  Rename define_insn to ...
            (*avx512dq_mul<mode>3<mask_name>): ... this.
            (<code><mode>3_mask): New any_logic define_expand pattern.
            (<mask_codefor><code><mode>3<mask_name>): Rename to ...
            (*<code><mode>3<mask_name>): ... this.

            * gcc.target/i386/pr104779.c: New test.

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

* [Bug target/104779] [12 Regression] ICE: in extract_insn, at recog.cc:2769 (error: unrecognizable insn)
  2022-03-04  8:36 [Bug rtl-optimization/104779] New: [12 Regression] ICE: in extract_insn, at recog.cc:2769 (error: unrecognizable insn) asolokha at gmx dot com
                   ` (5 preceding siblings ...)
  2022-03-07  8:41 ` cvs-commit at gcc dot gnu.org
@ 2022-03-07  8:51 ` jakub at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-03-07  8:51 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

end of thread, other threads:[~2022-03-07  8:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-04  8:36 [Bug rtl-optimization/104779] New: [12 Regression] ICE: in extract_insn, at recog.cc:2769 (error: unrecognizable insn) asolokha at gmx dot com
2022-03-04  9:42 ` [Bug target/104779] " pinskia at gcc dot gnu.org
2022-03-04  9:42 ` pinskia at gcc dot gnu.org
2022-03-04  9:50 ` jakub at gcc dot gnu.org
2022-03-04 12:05 ` jakub at gcc dot gnu.org
2022-03-04 13:14 ` jakub at gcc dot gnu.org
2022-03-07  8:41 ` cvs-commit at gcc dot gnu.org
2022-03-07  8:51 ` 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).