| 1 |
/* { dg-do assemble { target aarch64_asm_sve2p1_ok } } */ |
| 2 |
/* { dg-do compile { target { ! aarch64_asm_sve2p1_ok } } } */ |
| 3 |
/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */ |
| 4 |
|
| 5 |
#include "test_sve_acle.h" |
| 6 |
|
| 7 |
#pragma GCC target "+sve2p1" |
| 8 |
#ifdef STREAMING_COMPATIBLE |
| 9 |
#pragma GCC target "+sme2" |
| 10 |
#endif |
| 11 |
|
| 12 |
/* |
| 13 |
** whilele_p1_rr_s64: |
| 14 |
** whilele {p[0-9]+\.s, p[0-9]+\.s}, x0, x1 |
| 15 |
** mov [^\n]+ |
| 16 |
** mov [^\n]+ |
| 17 |
** ret |
| 18 |
*/ |
| 19 |
TEST_COMPARE_S_X2 (whilele_p1_rr_s64, int64_t, |
| 20 |
p1 = svwhilele_b32_s64_x2 (x0, x1), |
| 21 |
p1 = svwhilele_b32_x2 (x0, x1)) |
| 22 |
|
| 23 |
/* |
| 24 |
** whilele_p4_rr_s64: |
| 25 |
** whilele {p4\.s, p5\.s}, x0, x1 |
| 26 |
** ret |
| 27 |
*/ |
| 28 |
TEST_COMPARE_S_X2 (whilele_p4_rr_s64, int64_t, |
| 29 |
p4 = svwhilele_b32_s64_x2 (x0, x1), |
| 30 |
p4 = svwhilele_b32_x2 (x0, x1)) |
| 31 |
|
| 32 |
/* |
| 33 |
** whilele_p9_rr_s64: |
| 34 |
** whilele {p[0-9]+\.s, p[0-9]+\.s}, x0, x1 |
| 35 |
** mov [^\n]+ |
| 36 |
** mov [^\n]+ |
| 37 |
** ret |
| 38 |
*/ |
| 39 |
TEST_COMPARE_S_X2 (whilele_p9_rr_s64, int64_t, |
| 40 |
p9 = svwhilele_b32_s64_x2 (x0, x1), |
| 41 |
p9 = svwhilele_b32_x2 (x0, x1)) |
| 42 |
|
| 43 |
/* |
| 44 |
** whilele_p14_rr_s64: |
| 45 |
** whilele {p14\.s, p15\.s}, x0, x1 |
| 46 |
** ret |
| 47 |
*/ |
| 48 |
TEST_COMPARE_S_X2 (whilele_p14_rr_s64, int64_t, |
| 49 |
p14 = svwhilele_b32_s64_x2 (x0, x1), |
| 50 |
p14 = svwhilele_b32_x2 (x0, x1)) |
| 51 |
|
| 52 |
/* |
| 53 |
** whilele_p4_0r_s64: |
| 54 |
** whilele {p4\.s, p5\.s}, xzr, x1 |
| 55 |
** ret |
| 56 |
*/ |
| 57 |
TEST_COMPARE_S_X2 (whilele_p4_0r_s64, int64_t, |
| 58 |
p4 = svwhilele_b32_x2 ((int64_t) 0, x1), |
| 59 |
p4 = svwhilele_b32_s64_x2 (0, x1)) |
| 60 |
|
| 61 |
/* |
| 62 |
** whilele_p4_5r_s64: |
| 63 |
** mov (x[0-9]+), #?5 |
| 64 |
** whilele {p4\.s, p5\.s}, \1, x1 |
| 65 |
** ret |
| 66 |
*/ |
| 67 |
TEST_COMPARE_S_X2 (whilele_p4_5r_s64, int64_t, |
| 68 |
p4 = svwhilele_b32_x2 ((int64_t) 5, x1), |
| 69 |
p4 = svwhilele_b32_s64_x2 (5, x1)) |
| 70 |
|
| 71 |
/* |
| 72 |
** whilele_p4_r0_s64: |
| 73 |
** whilele {p4\.s, p5\.s}, x0, xzr |
| 74 |
** ret |
| 75 |
*/ |
| 76 |
TEST_COMPARE_S_X2 (whilele_p4_r0_s64, int64_t, |
| 77 |
p4 = svwhilele_b32_x2 (x0, (int64_t) 0), |
| 78 |
p4 = svwhilele_b32_s64_x2 (x0, 0)) |
| 79 |
|
| 80 |
/* |
| 81 |
** whilele_p14_r5_s64: |
| 82 |
** mov (x[0-9]+), #?5 |
| 83 |
** whilele {p14\.s, p15\.s}, x0, \1 |
| 84 |
** ret |
| 85 |
*/ |
| 86 |
TEST_COMPARE_S_X2 (whilele_p14_r5_s64, int64_t, |
| 87 |
p14 = svwhilele_b32_x2 (x0, (int64_t) 5), |
| 88 |
p14 = svwhilele_b32_s64_x2 (x0, 5)) |
| 89 |
|
| 90 |
/* |
| 91 |
** whilele_p4_rr_u64: |
| 92 |
** whilels {p4\.s, p5\.s}, x0, x1 |
| 93 |
** ret |
| 94 |
*/ |
| 95 |
TEST_COMPARE_S_X2 (whilele_p4_rr_u64, uint64_t, |
| 96 |
p4 = svwhilele_b32_u64_x2 (x0, x1), |
| 97 |
p4 = svwhilele_b32_x2 (x0, x1)) |
| 98 |
|
| 99 |
/* |
| 100 |
** whilele_p4_0r_u64: |
| 101 |
** whilels {p4\.s, p5\.s}, xzr, x1 |
| 102 |
** ret |
| 103 |
*/ |
| 104 |
TEST_COMPARE_S_X2 (whilele_p4_0r_u64, uint64_t, |
| 105 |
p4 = svwhilele_b32_x2 ((uint64_t) 0, x1), |
| 106 |
p4 = svwhilele_b32_u64_x2 (0, x1)) |
| 107 |
|
| 108 |
/* |
| 109 |
** whilele_p4_5r_u64: |
| 110 |
** mov (x[0-9]+), #?5 |
| 111 |
** whilels {p4\.s, p5\.s}, \1, x1 |
| 112 |
** ret |
| 113 |
*/ |
| 114 |
TEST_COMPARE_S_X2 (whilele_p4_5r_u64, uint64_t, |
| 115 |
p4 = svwhilele_b32_x2 ((uint64_t) 5, x1), |
| 116 |
p4 = svwhilele_b32_u64_x2 (5, x1)) |
| 117 |
|
| 118 |
/* |
| 119 |
** whilele_p4_r5_u64: |
| 120 |
** mov (x[0-9]+), #?5 |
| 121 |
** whilels {p4\.s, p5\.s}, x0, \1 |
| 122 |
** ret |
| 123 |
*/ |
| 124 |
TEST_COMPARE_S_X2 (whilele_p4_r5_u64, uint64_t, |
| 125 |
p4 = svwhilele_b32_x2 (x0, (uint64_t) 5), |
| 126 |
p4 = svwhilele_b32_u64_x2 (x0, 5)) |