Debian Codegraph @

gcc/testsuite/gdc.dg/simd23084.d

raw
1 // https://issues.dlang.org/show_bug.cgi?id=23084
2 // { dg-additional-options "-mavx" { target avx_runtime } }
3 // { dg-do compile { target { avx_runtime || vect_sizes_16B_8B } } }
4 // { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
5 import core.simd;
6
7 __vector(int[4]) test23084a(__vector(int[4]) a)
8 {
9 __vector(short[8]) r = cast(short)(a.array[0]);
10 return cast(__vector(int[4]))r;
11 }
12
13 __vector(int[4]) test23084b(__vector(int[4]) a)
14 {
15 __vector(byte[16]) r = cast(byte)(a.array[0]);
16 return cast(__vector(int[4]))r;
17 }