aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.dg/simd23084.d
blob: 1f40e3c99a89f515fa84cef54011241886e4ed07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// https://issues.dlang.org/show_bug.cgi?id=23084
// { dg-additional-options "-mavx" { target avx_runtime } }
// { dg-do compile { target { avx_runtime || vect_sizes_16B_8B } } }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
import core.simd;

__vector(int[4]) test23084a(__vector(int[4]) a)
{
    __vector(short[8]) r = cast(short)(a.array[0]);
    return cast(__vector(int[4]))r;
}

__vector(int[4]) test23084b(__vector(int[4]) a)
{
    __vector(byte[16]) r = cast(byte)(a.array[0]);
    return cast(__vector(int[4]))r;
}