Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/simd/pr99195_11.c

raw
1 /* PR target/99195. */
2 /* Check that we take advantage of 64-bit Advanced SIMD operations clearing
3 the top half of the vector register and no explicit zeroing instructions
4 are emitted. */
5 /* { dg-do compile } */
6 /* { dg-options "-O -march=armv8.2-a+dotprod" } */
7
8 #include <arm_neon.h>
9
10 #define DOTPROD(OT,AT,IT1,IT2,OP,S) \
11 OT \
12 foo_##OP##_##S (AT a, IT1 b, IT2 c) \
13 { \
14 AT zeros = vcreate_##S (0); \
15 return vcombine_##S (v##OP##_##S (a, b, c), zeros); \
16 }
17
18 #define DOTPROD_IDX(OT,AT,IT1,IT2,OP,S) \
19 OT \
20 foo_##OP##_##S (AT a, IT1 b, IT2 c) \
21 { \
22 AT zeros = vcreate_##S (0); \
23 return vcombine_##S (v##OP##_##S (a, b, c, 1), zeros); \
24 }
25
26 DOTPROD (int32x4_t, int32x2_t, int8x8_t, int8x8_t, dot, s32)
27 DOTPROD (uint32x4_t, uint32x2_t, uint8x8_t, uint8x8_t, dot, u32)
28 DOTPROD_IDX (int32x4_t, int32x2_t, int8x8_t, int8x8_t, dot_lane, s32)
29 DOTPROD_IDX (uint32x4_t, uint32x2_t, uint8x8_t, uint8x8_t, dot_lane, u32)
30
31 #pragma GCC target ("+i8mm")
32 DOTPROD (int32x4_t, int32x2_t, uint8x8_t, int8x8_t, usdot, s32)
33 DOTPROD_IDX (int32x4_t, int32x2_t, uint8x8_t, int8x8_t, usdot_lane, s32)
34 DOTPROD_IDX (int32x4_t, int32x2_t, int8x8_t, uint8x8_t, sudot_lane, s32)
35
36 /* { dg-final { scan-assembler-not {\tfmov\t} } } */
37 /* { dg-final { scan-assembler-not {\tmov\t} } } */
38