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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2023-10-10
          Component|rtl-optimization            |middle-end
     Ever confirmed|0                           |1
   Target Milestone|---                         |14.0
           Priority|P3                          |P1
           Keywords|                            |needs-bisection

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
(gdb) p debug_tree (exp)
 <vector_cst 0x7ffff6f25398
    type <vector_type 0x7ffff6eebf18 F
        type <real_type 0x7ffff6d672a0 float SF
            size <integer_cst 0x7ffff6d61180 constant 32>
            unit-size <integer_cst 0x7ffff6d61198 constant 4>
            align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7ffff6d672a0 precision:32
            pointer_to_this <pointer_type 0x7ffff6d67930>>
        sizes-gimplified V4SF
        size <integer_cst 0x7ffff6d40f78 constant 128>
        unit-size <integer_cst 0x7ffff6d40f90 constant 16>
        align:128 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7ffff6e99b28 nunits:4>
    constant npatterns:1 nelts-per-pattern:3
    elt:0:  <real_cst 0x7ffff6f13540 type <real_type 0x7ffff6d672a0 float>
        constant 0.0>
    elt:1:  <real_cst 0x7ffff6f13510 type <real_type 0x7ffff6d672a0 float>
        constant 9.0e+0> elt:2:  <real_cst 0x7ffff6f13540 0.0>>

Confirmed.  That's an odd vector mode 'F'!?  And we have three elements?

Happens after inlining bar () into foo ():

F bar (F a, F b)
{
  F c;

  <bb 2> [local count: 1073741824]:
  c_2 = VEC_PERM_EXPR <a_1(D), a_1(D), { 1, 0, 1, 2 }>; 
  __builtin_logbl (0.0);
  return c_2;

F foo ()
{
  F _3;

  <bb 2> [local count: 1073741824]:
  _3 = bar ({ 9.0e+0, 0.0, 0.0, 0.0 }, { 0.0, 0.0, 0.0, 0.0 });

and the constant folding of the VEC_PERM_EXPR causes this.

ICEs way earlier (during inlining) when you do -fdump-ipa-inline

Reply via email to