Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/vec-init-single-const.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fno-schedule-insns -fno-schedule-insns2" } */
3 /* { dg-final { check-function-bodies "**" "" "" { target { le } } } } */
4
5 #include <arm_neon.h>
6
7 /*
8 ** f_s8:
9 ** dup v0.16b, w0
10 ** movi (v[0-9]+)\.8b, 0x1
11 ** ins v0.b\[15\], \1\.b\[0\]
12 ** ret
13 */
14
15 int8x16_t f_s8(int8_t x)
16 {
17 return (int8x16_t) { x, x, x, x, x, x, x, x,
18 x, x, x, x, x, x, x, 1 };
19 }
20
21 /*
22 ** f_s16:
23 ** dup v0.8h, w0
24 ** movi (v[0-9]+)\.4h, 0x1
25 ** ins v0.h\[7\], \1\.h\[0\]
26 ** ret
27 */
28
29 int16x8_t f_s16(int16_t x)
30 {
31 return (int16x8_t) { x, x, x, x, x, x, x, 1 };
32 }
33
34 /*
35 ** f_s32:
36 ** dup v0.4s, w0
37 ** movi (v[0-9]+)\.2s, 0x1
38 ** ins v0.s\[3\], \1\.s\[0\]
39 ** ret
40 */
41
42 int32x4_t f_s32(int32_t x)
43 {
44 return (int32x4_t) { x, x, x, 1 };
45 }
46
47 /*
48 ** f_s64:
49 ** adrp x[0-9]+, .LC[0-9]+
50 ** ldr q0, \[x[0-9]+, #:lo12:.LC[0-9]+\]
51 ** ins v0\.d\[0\], x0
52 ** ret
53 */
54
55 int64x2_t f_s64(int64_t x)
56 {
57 return (int64x2_t) { x, 1 };
58 }