On Wed, Aug 19, 2026 at 4:15 AM Richard Biener <[email protected]> wrote:
>
> This special-cases BLKmode vector types appropriately.
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu.
>
> OK?
Ok.
>
> * tree.cc (tree_nop_conversion_p): Special case two BLKmode
> types.
> ---
> gcc/tree.cc | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/gcc/tree.cc b/gcc/tree.cc
> index 19069eb5960..52313fbd129 100644
> --- a/gcc/tree.cc
> +++ b/gcc/tree.cc
> @@ -12462,6 +12462,19 @@ tree_nop_conversion_p (const_tree outer_type,
> const_tree inner_type)
> || TREE_CODE (inner_type) == OFFSET_TYPE))
> return TYPE_PRECISION (outer_type) == TYPE_PRECISION (inner_type);
>
> + if (TYPE_MODE (outer_type) == BLKmode
> + && TYPE_MODE (inner_type) == BLKmode)
> + {
> + if (VECTOR_TYPE_P (outer_type)
> + && VECTOR_TYPE_P (inner_type)
> + && known_eq (TYPE_VECTOR_SUBPARTS (outer_type),
> + TYPE_VECTOR_SUBPARTS (inner_type))
> + && (TYPE_MODE (TREE_TYPE (outer_type))
> + == TYPE_MODE (TREE_TYPE (inner_type))))
> + return true;
> + return false;
> + }
> +
> /* Otherwise fall back on comparing machine modes (e.g. for
> aggregate types, floats). */
> return TYPE_MODE (outer_type) == TYPE_MODE (inner_type);
> --
> 2.51.0