public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/102254] New: [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)
@ 2021-09-09 11:12 asolokha at gmx dot com
  2021-09-09 11:29 ` [Bug rtl-optimization/102254] " rguenth at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: asolokha at gmx dot com @ 2021-09-09 11:12 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 102254
           Summary: [12 Regression] ICE: in extract_insn, at recog.c:2769
                    (error: unrecognizable insn)
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---
            Target: aarch64-linux-gnu

gcc-12.0.0-alpha20210905 snapshot (g:a827909537cf085e5673ca7816b7bd7151d89fc5)
ICEs when compiling the following testcase w/ -Og:

void
foo (void)
{
    int x;

    *((double *) &x) = 0;
}

% aarch64-linux-gnu-gcc-12.0.0 -Og -c zkc6b9w3.c
zkc6b9w3.c: In function 'foo':
zkc6b9w3.c:7:1: error: unrecognizable insn:
    7 | }
      | ^
(insn 5 2 0 2 (set (subreg:DF (reg/v:SI 92 [ x ]) 0)
        (const_double:DF 0.0 [0x0.0p+0])) "zkc6b9w3.c":6:22 -1
     (nil))
during RTL pass: vregs
zkc6b9w3.c:7:1: internal compiler error: in extract_insn, at recog.c:2769
0x75df07 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
       
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-12.0.0_alpha20210905/work/gcc-12-20210905/gcc/rtl-error.c:108
0x75df27 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
       
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-12.0.0_alpha20210905/work/gcc-12-20210905/gcc/rtl-error.c:116
0x75c539 extract_insn(rtx_insn*)
       
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-12.0.0_alpha20210905/work/gcc-12-20210905/gcc/recog.c:2769
0xbc758c instantiate_virtual_regs_in_insn
       
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-12.0.0_alpha20210905/work/gcc-12-20210905/gcc/function.c:1611
0xbc758c instantiate_virtual_regs
       
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-12.0.0_alpha20210905/work/gcc-12-20210905/gcc/function.c:1985
0xbc758c execute
       
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-12.0.0_alpha20210905/work/gcc-12-20210905/gcc/function.c:2034

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

* [Bug rtl-optimization/102254] [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)
  2021-09-09 11:12 [Bug target/102254] New: [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn) asolokha at gmx dot com
@ 2021-09-09 11:29 ` rguenth at gcc dot gnu.org
  2021-09-09 11:33 ` jakub at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-09-09 11:29 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.0
                 CC|                            |crazylht at gmail dot com

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Likely another fallout of the subreg saga.  This is one kind of subreg we
probably should continue to disallow (paradoxical float<->int subreg).

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

* [Bug rtl-optimization/102254] [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)
  2021-09-09 11:12 [Bug target/102254] New: [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn) asolokha at gmx dot com
  2021-09-09 11:29 ` [Bug rtl-optimization/102254] " rguenth at gcc dot gnu.org
@ 2021-09-09 11:33 ` jakub at gcc dot gnu.org
  2021-09-09 12:29 ` rguenth at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-09-09 11:33 UTC (permalink / raw)
  To: gcc-bugs

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

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> ---
And maybe also should throw away (with a warning) or turn into
__builtin_unreachable () during GIMPLE passes.  Because it is a clear UB.

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

* [Bug rtl-optimization/102254] [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)
  2021-09-09 11:12 [Bug target/102254] New: [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn) asolokha at gmx dot com
  2021-09-09 11:29 ` [Bug rtl-optimization/102254] " rguenth at gcc dot gnu.org
  2021-09-09 11:33 ` jakub at gcc dot gnu.org
@ 2021-09-09 12:29 ` rguenth at gcc dot gnu.org
  2021-09-10  1:36 ` crazylht at gmail dot com
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-09-09 12:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #2)
> And maybe also should throw away (with a warning) or turn into
> __builtin_unreachable () during GIMPLE passes.  Because it is a clear UB.

Yes, a candidate for isolate-paths IMHO.  Not sure if it would count
as "dereference" and thus applicable at -fisolate-erroneous-paths-dereference.

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

* [Bug rtl-optimization/102254] [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)
  2021-09-09 11:12 [Bug target/102254] New: [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn) asolokha at gmx dot com
                   ` (2 preceding siblings ...)
  2021-09-09 12:29 ` rguenth at gcc dot gnu.org
@ 2021-09-10  1:36 ` crazylht at gmail dot com
  2021-09-10  1:43 ` crazylht at gmail dot com
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: crazylht at gmail dot com @ 2021-09-10  1:36 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Hongtao.liu <crazylht at gmail dot com> ---
Yes, also ICE for x86_64-linux-gnu-gcc

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

* [Bug rtl-optimization/102254] [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)
  2021-09-09 11:12 [Bug target/102254] New: [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn) asolokha at gmx dot com
                   ` (3 preceding siblings ...)
  2021-09-10  1:36 ` crazylht at gmail dot com
@ 2021-09-10  1:43 ` crazylht at gmail dot com
  2021-09-10  2:40 ` crazylht at gmail dot com
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: crazylht at gmail dot com @ 2021-09-10  1:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Hongtao.liu <crazylht at gmail dot com> ---
and also ICE for (subreg:DF(reg:SF)), but ok for (subreg:v2df(reg:SF)0)

void
foo (void)
{
    float x;

    *((double *) &x) = 0;
}

typedef double v2df __attribute__((vector_size(16)));
void
foo1 (v2df a)
{
  float x;

  *((v2df*) &x) = a;
}

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

* [Bug rtl-optimization/102254] [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)
  2021-09-09 11:12 [Bug target/102254] New: [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn) asolokha at gmx dot com
                   ` (4 preceding siblings ...)
  2021-09-10  1:43 ` crazylht at gmail dot com
@ 2021-09-10  2:40 ` crazylht at gmail dot com
  2021-09-10  4:22 ` crazylht at gmail dot com
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: crazylht at gmail dot com @ 2021-09-10  2:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Hongtao.liu <crazylht at gmail dot com> ---
Another testcase cut from pr102154

#define MODFL __builtin_modfl
void foo() {
  long iptrll;
  MODFL(0.5l, (long double *)&iptrll);
}

$ ./xgcc -B. pr48641.c -frounding-math -Og -fno-tree-fre
pr48641.c: In function ‘foo’:
pr48641.c:5:1: error: unrecognizable insn:
    5 | }
      | ^
(insn 5 2 0 2 (set (subreg:TF (reg/v:DI 92 [ iptrll ]) 0)
        (const_double:TF 0.0 [0x0.0p+0])) "pr48641.c":4:3 -1
     (nil))
during RTL pass: vregs

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

* [Bug rtl-optimization/102254] [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)
  2021-09-09 11:12 [Bug target/102254] New: [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn) asolokha at gmx dot com
                   ` (5 preceding siblings ...)
  2021-09-10  2:40 ` crazylht at gmail dot com
@ 2021-09-10  4:22 ` crazylht at gmail dot com
  2021-09-10 21:55 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: crazylht at gmail dot com @ 2021-09-10  4:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Hongtao.liu <crazylht at gmail dot com> ---
And here is invalid subreg from general_operand

#ifdef INSN_SCHEDULING
      /* On machines that have insn scheduling, we want all memory
         reference to be explicit, so outlaw paradoxical SUBREGs.
         However, we must allow them after reload so that they can
         get cleaned up by cleanup_subreg_operands.  */
      if (!reload_completed && MEM_P (sub)
          && paradoxical_subreg_p (op))
        return false;
#endif
      /* Avoid memories with nonzero SUBREG_BYTE, as offsetting the memory
         may result in incorrect reference.  We should simplify all valid
         subregs of MEM anyway.  But allow this after reload because we
         might be called from cleanup_subreg_operands.

         ??? This is a kludge.  */
      if (!reload_completed
          && maybe_ne (SUBREG_BYTE (op), 0)
          && MEM_P (sub))
        return false;

      if (REG_P (sub)
          && REGNO (sub) < FIRST_PSEUDO_REGISTER
          && !REG_CAN_CHANGE_MODE_P (REGNO (sub), GET_MODE (sub), mode)
          && GET_MODE_CLASS (GET_MODE (sub)) != MODE_COMPLEX_INT
          && GET_MODE_CLASS (GET_MODE (sub)) != MODE_COMPLEX_FLOAT
          /* LRA can generate some invalid SUBREGS just for matched
             operand reload presentation.  LRA needs to treat them as
             valid.  */
          && ! LRA_SUBREG_P (op))
        return false;

      /* FLOAT_MODE subregs can't be paradoxical.  Combine will occasionally
         create such rtl, and we must reject it.  */
      if (SCALAR_FLOAT_MODE_P (GET_MODE (op))
          /* LRA can use subreg to store a floating point value in an
             integer mode.  Although the floating point and the
             integer modes need the same number of hard registers, the
             size of floating point mode can be less than the integer
             mode.  */
          && ! lra_in_progress 
          && paradoxical_subreg_p (op))
        return false;

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

* [Bug rtl-optimization/102254] [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)
  2021-09-09 11:12 [Bug target/102254] New: [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn) asolokha at gmx dot com
                   ` (6 preceding siblings ...)
  2021-09-10  4:22 ` crazylht at gmail dot com
@ 2021-09-10 21:55 ` cvs-commit at gcc dot gnu.org
  2021-09-14  6:27 ` asolokha at gmx dot com
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-09-10 21:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- 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:57b7c432cce893e1ba60d9b94a9606df6b419379

commit r12-3457-g57b7c432cce893e1ba60d9b94a9606df6b419379
Author: liuhongt <hongtao.liu@intel.com>
Date:   Fri Sep 10 20:02:25 2021 +0800

    Revert "Get rid of all float-int special cases in validate_subreg."

    This reverts commit d2874d905647a1d146dafa60199d440e837adc4d.

    PR target/102254
    PR target/102154
    PR target/102211

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

* [Bug rtl-optimization/102254] [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)
  2021-09-09 11:12 [Bug target/102254] New: [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn) asolokha at gmx dot com
                   ` (7 preceding siblings ...)
  2021-09-10 21:55 ` cvs-commit at gcc dot gnu.org
@ 2021-09-14  6:27 ` asolokha at gmx dot com
  2021-09-14  7:02 ` crazylht at gmail dot com
  2021-09-14  7:25 ` asolokha at gmx dot com
  10 siblings, 0 replies; 12+ messages in thread
From: asolokha at gmx dot com @ 2021-09-14  6:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Arseny Solokha <asolokha at gmx dot com> ---
Should this PR be closed now?

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

* [Bug rtl-optimization/102254] [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)
  2021-09-09 11:12 [Bug target/102254] New: [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn) asolokha at gmx dot com
                   ` (8 preceding siblings ...)
  2021-09-14  6:27 ` asolokha at gmx dot com
@ 2021-09-14  7:02 ` crazylht at gmail dot com
  2021-09-14  7:25 ` asolokha at gmx dot com
  10 siblings, 0 replies; 12+ messages in thread
From: crazylht at gmail dot com @ 2021-09-14  7:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to Arseny Solokha from comment #9)
> Should this PR be closed now?

I think so, the guilty patch has been reverted.

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

* [Bug rtl-optimization/102254] [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)
  2021-09-09 11:12 [Bug target/102254] New: [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn) asolokha at gmx dot com
                   ` (9 preceding siblings ...)
  2021-09-14  7:02 ` crazylht at gmail dot com
@ 2021-09-14  7:25 ` asolokha at gmx dot com
  10 siblings, 0 replies; 12+ messages in thread
From: asolokha at gmx dot com @ 2021-09-14  7:25 UTC (permalink / raw)
  To: gcc-bugs

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

Arseny Solokha <asolokha at gmx dot com> changed:

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

--- Comment #11 from Arseny Solokha <asolokha at gmx dot com> ---
Fixed by r12-3457.

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

end of thread, other threads:[~2021-09-14  7:25 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-09 11:12 [Bug target/102254] New: [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn) asolokha at gmx dot com
2021-09-09 11:29 ` [Bug rtl-optimization/102254] " rguenth at gcc dot gnu.org
2021-09-09 11:33 ` jakub at gcc dot gnu.org
2021-09-09 12:29 ` rguenth at gcc dot gnu.org
2021-09-10  1:36 ` crazylht at gmail dot com
2021-09-10  1:43 ` crazylht at gmail dot com
2021-09-10  2:40 ` crazylht at gmail dot com
2021-09-10  4:22 ` crazylht at gmail dot com
2021-09-10 21:55 ` cvs-commit at gcc dot gnu.org
2021-09-14  6:27 ` asolokha at gmx dot com
2021-09-14  7:02 ` crazylht at gmail dot com
2021-09-14  7:25 ` asolokha at gmx dot com

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).