1 /* { dg-do assemble { target { aarch64*-*-* } } } */
2 /* { dg-require-effective-target arm_v8_2a_bf16_neon_ok } */
3 /* { dg-additional-options "-march=armv8.2-a -O3 --save-temps" } */
4 /* { dg-final { check-function-bodies "**" "" } } */
8 #pragma GCC push_options
9 #pragma GCC target ("+bf16")
19 bfloat16_t
stacktest1 (bfloat16_t __a
)
21 volatile bfloat16_t b
= __a
;
33 bfloat16x4_t
stacktest2 (bfloat16x4_t __a
)
35 volatile bfloat16x4_t b
= __a
;
47 bfloat16x8_t
stacktest3 (bfloat16x8_t __a
)
49 volatile bfloat16x8_t b
= __a
;
53 /* Test compilation of __attribute__ vectors of 8, 16, 32, etc. BFloats. */
54 typedef bfloat16_t v8bf
__attribute__((vector_size(16)));
55 typedef bfloat16_t v16bf
__attribute__((vector_size(32)));
56 typedef bfloat16_t v32bf
__attribute__((vector_size(64)));
57 typedef bfloat16_t v64bf
__attribute__((vector_size(128)));
58 typedef bfloat16_t v128bf
__attribute__((vector_size(256)));
60 v8bf
stacktest4 (v8bf __a
)
62 volatile v8bf b
= __a
;
66 v16bf
stacktest5 (v16bf __a
)
68 volatile v16bf b
= __a
;
72 v32bf
stacktest6 (v32bf __a
)
74 volatile v32bf b
= __a
;
78 v64bf
stacktest7 (v64bf __a
)
80 volatile v64bf b
= __a
;
84 v128bf
stacktest8 (v128bf __a
)
86 volatile v128bf b
= __a
;
90 /* Test use of constant values to assign values to vectors. */
92 typedef bfloat16_t v2bf
__attribute__((vector_size(4)));
93 v2bf
c2 (void) { return (v2bf
) 0x12345678; }
95 bfloat16x4_t
c3 (void) { return (bfloat16x4_t
) 0x1234567812345678; }
97 #pragma GCC pop_options