https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105554
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #6)
> We fail in the param assignment:
>
> (gdb) pp x
> (reg:V4DI 82)
> (gdb) pp y
> (mem/c:BLK (reg/f:DI 76 virtual-incoming-args) [1 x+0 S32 A256])
>
> So we will likely need something similar to what we have in tree-inline.cc:
>
> 5928 /* For vector typed decls make sure to update DECL_MODE according
> 5929 to the new function context. */
> 5930 if (VECTOR_TYPE_P (TREE_TYPE (copy)))
> 5931 SET_DECL_MODE (copy, TYPE_MODE (TREE_TYPE (copy)));
>
> @Richi: Do you have a clue where to adjust it?
I think it goes wrong in use_register_for_decl (called from
assign_parm_setup_block).
diff --git a/gcc/function.cc b/gcc/function.cc
index d975b001ec9..b54f9b33c6a 100644
--- a/gcc/function.cc
+++ b/gcc/function.cc
@@ -2229,7 +2229,9 @@ use_register_for_decl (const_tree decl)
}
/* Only register-like things go in registers. */
- if (DECL_MODE (decl) == BLKmode)
+ if (DECL_MODE (decl) == BLKmode
+ || (VECTOR_TYPE_P (TREE_TYPE (decl))
+ && TYPE_MODE (TREE_TYPE (decl)) == BLKmode))
return false;
/* If -ffloat-store specified, don't put explicit float variables
fixes the ICE, not sure if we should adjust the PARM_DECLs mode somewhere
in target cloning instead though?