On Wed, Aug 30, 2023 at 01:54:46PM +0200, Richard Biener via Gcc-patches wrote:
> * gcc.dg/tree-ssa/forwprop-42.c: New testcase.
> --- /dev/null
> +++ b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-42.c
> @@ -0,0 +1,17 @@
> +/* { dg-do compile } */
> +/* { dg-options "-O -fdump-tree-cddce1" } */
> +
> +typedef unsigned long v2di __attribute__((vector_size(16)));
Shouldn't this be unsigned long long ? Otherwise it is actually V4SImode
rather than V2DImode.
> +
> +v2di g;
> +void test (v2di *v)
> +{
> + v2di lo = v[0];
> + v2di hi = v[1];
> + v2di res;
> + res[1] = hi[1];
> + res[0] = lo[0];
> + g = res;
> +}
> +
> +/* { dg-final { scan-tree-dump-times "VEC_PERM_EXPR <\[^>\]*, { 0, 3 }>" 1
> "cddce1" } } */
> --
> 2.35.3
Jakub