[Bug rtl-optimization/102254] [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)

2021-09-14 Thread asolokha at gmx dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102254

Arseny Solokha  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|UNCONFIRMED |RESOLVED

--- Comment #11 from Arseny Solokha  ---
Fixed by r12-3457.

[Bug rtl-optimization/102254] [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)

2021-09-14 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102254

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

I think so, the guilty patch has been reverted.

[Bug rtl-optimization/102254] [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)

2021-09-14 Thread asolokha at gmx dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102254

--- Comment #9 from Arseny Solokha  ---
Should this PR be closed now?

[Bug rtl-optimization/102254] [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)

2021-09-10 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102254

--- Comment #8 from CVS Commits  ---
The master branch has been updated by hongtao Liu :

https://gcc.gnu.org/g:57b7c432cce893e1ba60d9b94a9606df6b419379

commit r12-3457-g57b7c432cce893e1ba60d9b94a9606df6b419379
Author: liuhongt 
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

[Bug rtl-optimization/102254] [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)

2021-09-09 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102254

--- Comment #7 from Hongtao.liu  ---
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;

[Bug rtl-optimization/102254] [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)

2021-09-09 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102254

--- Comment #6 from Hongtao.liu  ---
Another testcase cut from pr102154

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

$ ./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

[Bug rtl-optimization/102254] [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)

2021-09-09 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102254

--- Comment #5 from Hongtao.liu  ---
and also ICE for (subreg:DF(reg:SF)), but ok for (subreg:v2df(reg:SF)0)

void
foo (void)
{
float x;

*((double *) ) = 0;
}

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

  *((v2df*) ) = a;
}

[Bug rtl-optimization/102254] [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)

2021-09-09 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102254

--- Comment #4 from Hongtao.liu  ---
Yes, also ICE for x86_64-linux-gnu-gcc

[Bug rtl-optimization/102254] [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)

2021-09-09 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102254

--- Comment #3 from Richard Biener  ---
(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.

[Bug rtl-optimization/102254] [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)

2021-09-09 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102254

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek  ---
And maybe also should throw away (with a warning) or turn into
__builtin_unreachable () during GIMPLE passes.  Because it is a clear UB.

[Bug rtl-optimization/102254] [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)

2021-09-09 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102254

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |12.0
 CC||crazylht at gmail dot com

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