[Bug tree-optimization/101534] ICE in create_tailcall_accumulator, at tree-tailcall.c:1083

2021-07-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101534

Andrew Pinski  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from Andrew Pinski  ---
I put the wrong PR # in the commit log, I forgot the 4 at the end :(.
r12-2473

[Bug tree-optimization/101534] ICE in create_tailcall_accumulator, at tree-tailcall.c:1083

2021-07-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101534

Andrew Pinski  changed:

   What|Removed |Added

URL|https://gcc.gnu.org/piperma |https://gcc.gnu.org/piperma
   |il/gcc-patches/2021-July/57 |il/gcc-patches/2021-July/57
   |5692.html   |5771.html

--- Comment #6 from Andrew Pinski  ---
Updated patch:
https://gcc.gnu.org/pipermail/gcc-patches/2021-July/575771.html

[Bug tree-optimization/101534] ICE in create_tailcall_accumulator, at tree-tailcall.c:1083

2021-07-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101534

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||patch
URL||https://gcc.gnu.org/piperma
   ||il/gcc-patches/2021-July/57
   ||5692.html

--- Comment #5 from Andrew Pinski  ---
Patch submitted:
https://gcc.gnu.org/pipermail/gcc-patches/2021-July/575692.html

[Bug tree-optimization/101534] ICE in create_tailcall_accumulator, at tree-tailcall.c:1083

2021-07-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101534

--- Comment #4 from Andrew Pinski  ---
Created attachment 51183
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51183=edit
Patch which is under testing

[Bug tree-optimization/101534] ICE in create_tailcall_accumulator, at tree-tailcall.c:1083

2021-07-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101534

--- Comment #3 from Andrew Pinski  ---
The fix which I am testing:
--- a/gcc/tree-tailcall.c
+++ b/gcc/tree-tailcall.c
@@ -1080,6 +1080,9 @@ create_tailcall_accumulator (const char *label,
basic_block bb, tree init)

   phi = create_phi_node (tmp, bb);
   /* RET_TYPE can be a float when -ffast-maths is enabled.  */
+  /* For vectors create a dup. */
+  if (VECTOR_TYPE_P (ret_type))
+init = build_vector_from_val (ret_type, fold_convert (TREE_TYPE
(ret_type), init));
   add_phi_arg (phi, fold_convert (ret_type, init), single_pred_edge (bb),
   UNKNOWN_LOCATION);
   return PHI_RESULT (phi);

[Bug tree-optimization/101534] ICE in create_tailcall_accumulator, at tree-tailcall.c:1083

2021-07-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101534

Andrew Pinski  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |pinskia at gcc dot 
gnu.org

--- Comment #2 from Andrew Pinski  ---
Mine.

[Bug tree-optimization/101534] ICE in create_tailcall_accumulator, at tree-tailcall.c:1083

2021-07-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101534

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
  Component|c   |tree-optimization
   Last reconfirmed||2021-07-20
 Status|UNCONFIRMED |NEW

--- Comment #1 from Andrew Pinski  ---
Confirmed.
(gdb) p debug_tree(ret_type)
 
unit-size 
align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0xf59b05e8 precision:32 min  max

pointer_to_this >
sizes-gimplified V2SI
size  constant 64>
unit-size  constant 8>
align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0xf59db670 nunits:2 context >
$1 = void
(gdb) p debug_tree(init)
  constant 1>


create_tailcall_accumulator needs to create a splat/dup if the init type is
scalar and the ret_type is a vector.