Debian Codegraph @

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

raw
1 /* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
2
3 #include "test_sve_acle.h"
4
5 /*
6 ** subhnt_u32_tied1:
7 ** subhnt z0\.h, z4\.s, z5\.s
8 ** ret
9 */
10 TEST_DUAL_Z (subhnt_u32_tied1, svuint16_t, svuint32_t,
11 z0 = svsubhnt_u32 (z0, z4, z5),
12 z0 = svsubhnt (z0, z4, z5))
13
14 /* Bad RA choice: no preferred output sequence. */
15 TEST_DUAL_Z_REV (subhnt_u32_tied2, svuint16_t, svuint32_t,
16 z0_res = svsubhnt_u32 (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_u32_tied3, svuint16_t, svuint32_t,
21 z0_res = svsubhnt_u32 (z4, z1, z0),
22 z0_res = svsubhnt (z4, z1, z0))
23
24 /*
25 ** subhnt_u32_untied:
26 ** (
27 ** mov z0\.d, z1\.d
28 ** subhnt z0\.h, z4\.s, z5\.s
29 ** |
30 ** subhnt z1\.h, z4\.s, z5\.s
31 ** mov z0\.d, z1\.d
32 ** )
33 ** ret
34 */
35 TEST_DUAL_Z (subhnt_u32_untied, svuint16_t, svuint32_t,
36 z0 = svsubhnt_u32 (z1, z4, z5),
37 z0 = svsubhnt (z1, z4, z5))
38
39 /*
40 ** subhnt_w0_u32_tied1:
41 ** mov (z[0-9]+\.s), w0
42 ** subhnt z0\.h, z4\.s, \1
43 ** ret
44 */
45 TEST_DUAL_ZX (subhnt_w0_u32_tied1, svuint16_t, svuint32_t, uint32_t,
46 z0 = svsubhnt_n_u32 (z0, z4, x0),
47 z0 = svsubhnt (z0, z4, x0))
48
49 /*
50 ** subhnt_w0_u32_untied:
51 ** mov (z[0-9]+\.s), w0
52 ** (
53 ** mov z0\.d, z1\.d
54 ** subhnt z0\.h, z4\.s, \1
55 ** |
56 ** subhnt z1\.h, z4\.s, \1
57 ** mov z0\.d, z1\.d
58 ** )
59 ** ret
60 */
61 TEST_DUAL_ZX (subhnt_w0_u32_untied, svuint16_t, svuint32_t, uint32_t,
62 z0 = svsubhnt_n_u32 (z1, z4, x0),
63 z0 = svsubhnt (z1, z4, x0))
64
65 /*
66 ** subhnt_11_u32_tied1:
67 ** mov (z[0-9]+\.s), #11
68 ** subhnt z0\.h, z4\.s, \1
69 ** ret
70 */
71 TEST_DUAL_Z (subhnt_11_u32_tied1, svuint16_t, svuint32_t,
72 z0 = svsubhnt_n_u32 (z0, z4, 11),
73 z0 = svsubhnt (z0, z4, 11))
74
75 /*
76 ** subhnt_11_u32_untied:
77 ** mov (z[0-9]+\.s), #11
78 ** (
79 ** mov z0\.d, z1\.d
80 ** subhnt z0\.h, z4\.s, \1
81 ** |
82 ** subhnt z1\.h, z4\.s, \1
83 ** mov z0\.d, z1\.d
84 ** )
85 ** ret
86 */
87 TEST_DUAL_Z (subhnt_11_u32_untied, svuint16_t, svuint32_t,
88 z0 = svsubhnt_n_u32 (z1, z4, 11),
89 z0 = svsubhnt (z1, z4, 11))