Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/sve2/acle/asm/subhnt_s64.c

raw
1 /* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
2
3 #include "test_sve_acle.h"
4
5 /*
6 ** subhnt_s64_tied1:
7 ** subhnt z0\.s, z4\.d, z5\.d
8 ** ret
9 */
10 TEST_DUAL_Z (subhnt_s64_tied1, svint32_t, svint64_t,
11 z0 = svsubhnt_s64 (z0, z4, z5),
12 z0 = svsubhnt (z0, z4, z5))
13
14 /* Bad RA choice: no preferred output sequence. */
15 TEST_DUAL_Z_REV (subhnt_s64_tied2, svint32_t, svint64_t,
16 z0_res = svsubhnt_s64 (z4, z0, z1),
17 z0_res = svsubhnt (z4, z0, z1))
18
19 /* Bad RA choice: no preferred output sequence. */
20 TEST_DUAL_Z_REV (subhnt_s64_tied3, svint32_t, svint64_t,
21 z0_res = svsubhnt_s64 (z4, z1, z0),
22 z0_res = svsubhnt (z4, z1, z0))
23
24 /*
25 ** subhnt_s64_untied:
26 ** (
27 ** mov z0\.d, z1\.d
28 ** subhnt z0\.s, z4\.d, z5\.d
29 ** |
30 ** subhnt z1\.s, z4\.d, z5\.d
31 ** mov z0\.d, z1\.d
32 ** )
33 ** ret
34 */
35 TEST_DUAL_Z (subhnt_s64_untied, svint32_t, svint64_t,
36 z0 = svsubhnt_s64 (z1, z4, z5),
37 z0 = svsubhnt (z1, z4, z5))
38
39 /*
40 ** subhnt_x0_s64_tied1:
41 ** mov (z[0-9]+\.d), x0
42 ** subhnt z0\.s, z4\.d, \1
43 ** ret
44 */
45 TEST_DUAL_ZX (subhnt_x0_s64_tied1, svint32_t, svint64_t, int64_t,
46 z0 = svsubhnt_n_s64 (z0, z4, x0),
47 z0 = svsubhnt (z0, z4, x0))
48
49 /*
50 ** subhnt_x0_s64_untied:
51 ** mov (z[0-9]+\.d), x0
52 ** (
53 ** mov z0\.d, z1\.d
54 ** subhnt z0\.s, z4\.d, \1
55 ** |
56 ** subhnt z1\.s, z4\.d, \1
57 ** mov z0\.d, z1\.d
58 ** )
59 ** ret
60 */
61 TEST_DUAL_ZX (subhnt_x0_s64_untied, svint32_t, svint64_t, int64_t,
62 z0 = svsubhnt_n_s64 (z1, z4, x0),
63 z0 = svsubhnt (z1, z4, x0))
64
65 /*
66 ** subhnt_11_s64_tied1:
67 ** mov (z[0-9]+\.d), #11
68 ** subhnt z0\.s, z4\.d, \1
69 ** ret
70 */
71 TEST_DUAL_Z (subhnt_11_s64_tied1, svint32_t, svint64_t,
72 z0 = svsubhnt_n_s64 (z0, z4, 11),
73 z0 = svsubhnt (z0, z4, 11))
74
75 /*
76 ** subhnt_11_s64_untied:
77 ** mov (z[0-9]+\.d), #11
78 ** (
79 ** mov z0\.d, z1\.d
80 ** subhnt z0\.s, z4\.d, \1
81 ** |
82 ** subhnt z1\.s, z4\.d, \1
83 ** mov z0\.d, z1\.d
84 ** )
85 ** ret
86 */
87 TEST_DUAL_Z (subhnt_11_s64_untied, svint32_t, svint64_t,
88 z0 = svsubhnt_n_s64 (z1, z4, 11),
89 z0 = svsubhnt (z1, z4, 11))