Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/sve/acle/asm/ldff1ub_s32.c

raw
1 /* { dg-skip-if "" { *-*-* } { "-DSTREAMING_COMPATIBLE" } { "" } } */
2 /* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" { target { ! ilp32 } } } } */
3
4 #include "test_sve_acle.h"
5
6 /*
7 ** ldff1ub_s32_base:
8 ** ldff1b z0\.s, p0/z, \[x0\]
9 ** ret
10 */
11 TEST_LOAD (ldff1ub_s32_base, svint32_t, uint8_t,
12 z0 = svldff1ub_s32 (p0, x0),
13 z0 = svldff1ub_s32 (p0, x0))
14
15 /*
16 ** ldff1ub_s32_index:
17 ** ldff1b z0\.s, p0/z, \[x0, x1\]
18 ** ret
19 */
20 TEST_LOAD (ldff1ub_s32_index, svint32_t, uint8_t,
21 z0 = svldff1ub_s32 (p0, x0 + x1),
22 z0 = svldff1ub_s32 (p0, x0 + x1))
23
24 /* Moving the constant into a register would also be OK. */
25 /*
26 ** ldff1ub_s32_1:
27 ** incw x0
28 ** ldff1b z0\.s, p0/z, \[x0\]
29 ** ret
30 */
31 TEST_LOAD (ldff1ub_s32_1, svint32_t, uint8_t,
32 z0 = svldff1ub_s32 (p0, x0 + svcntw ()),
33 z0 = svldff1ub_s32 (p0, x0 + svcntw ()))
34
35 /* Moving the constant into a register would also be OK. */
36 /*
37 ** ldff1ub_s32_m1:
38 ** decw x0
39 ** ldff1b z0\.s, p0/z, \[x0\]
40 ** ret
41 */
42 TEST_LOAD (ldff1ub_s32_m1, svint32_t, uint8_t,
43 z0 = svldff1ub_s32 (p0, x0 - svcntw ()),
44 z0 = svldff1ub_s32 (p0, x0 - svcntw ()))
45
46 /*
47 ** ldff1ub_vnum_s32_0:
48 ** ldff1b z0\.s, p0/z, \[x0\]
49 ** ret
50 */
51 TEST_LOAD (ldff1ub_vnum_s32_0, svint32_t, uint8_t,
52 z0 = svldff1ub_vnum_s32 (p0, x0, 0),
53 z0 = svldff1ub_vnum_s32 (p0, x0, 0))
54
55 /* Moving the constant into a register would also be OK. */
56 /*
57 ** ldff1ub_vnum_s32_1:
58 ** incw x0
59 ** ldff1b z0\.s, p0/z, \[x0\]
60 ** ret
61 */
62 TEST_LOAD (ldff1ub_vnum_s32_1, svint32_t, uint8_t,
63 z0 = svldff1ub_vnum_s32 (p0, x0, 1),
64 z0 = svldff1ub_vnum_s32 (p0, x0, 1))
65
66 /* Moving the constant into a register would also be OK. */
67 /*
68 ** ldff1ub_vnum_s32_m1:
69 ** decw x0
70 ** ldff1b z0\.s, p0/z, \[x0\]
71 ** ret
72 */
73 TEST_LOAD (ldff1ub_vnum_s32_m1, svint32_t, uint8_t,
74 z0 = svldff1ub_vnum_s32 (p0, x0, -1),
75 z0 = svldff1ub_vnum_s32 (p0, x0, -1))
76
77 /*
78 ** ldff1ub_vnum_s32_x1:
79 ** cntw (x[0-9]+)
80 ** (
81 ** madd (x[0-9]+), (?:x1, \1|\1, x1), x0
82 ** ldff1b z0\.s, p0/z, \[\2\]
83 ** |
84 ** mul (x[0-9]+), (?:x1, \1|\1, x1)
85 ** ldff1b z0\.s, p0/z, \[x0, \3\]
86 ** )
87 ** ret
88 */
89 TEST_LOAD (ldff1ub_vnum_s32_x1, svint32_t, uint8_t,
90 z0 = svldff1ub_vnum_s32 (p0, x0, x1),
91 z0 = svldff1ub_vnum_s32 (p0, x0, x1))