| 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 |
** ldff1sh_gather_u64_tied1: |
| 8 |
** ldff1sh z0\.d, p0/z, \[z0\.d\] |
| 9 |
** ret |
| 10 |
*/ |
| 11 |
TEST_LOAD_GATHER_ZS (ldff1sh_gather_u64_tied1, svuint64_t, svuint64_t, |
| 12 |
z0_res = svldff1sh_gather_u64base_u64 (p0, z0), |
| 13 |
z0_res = svldff1sh_gather_u64 (p0, z0)) |
| 14 |
|
| 15 |
/* |
| 16 |
** ldff1sh_gather_u64_untied: |
| 17 |
** ldff1sh z0\.d, p0/z, \[z1\.d\] |
| 18 |
** ret |
| 19 |
*/ |
| 20 |
TEST_LOAD_GATHER_ZS (ldff1sh_gather_u64_untied, svuint64_t, svuint64_t, |
| 21 |
z0_res = svldff1sh_gather_u64base_u64 (p0, z1), |
| 22 |
z0_res = svldff1sh_gather_u64 (p0, z1)) |
| 23 |
|
| 24 |
/* |
| 25 |
** ldff1sh_gather_x0_u64_offset: |
| 26 |
** ldff1sh z0\.d, p0/z, \[x0, z0\.d\] |
| 27 |
** ret |
| 28 |
*/ |
| 29 |
TEST_LOAD_GATHER_ZS (ldff1sh_gather_x0_u64_offset, svuint64_t, svuint64_t, |
| 30 |
z0_res = svldff1sh_gather_u64base_offset_u64 (p0, z0, x0), |
| 31 |
z0_res = svldff1sh_gather_offset_u64 (p0, z0, x0)) |
| 32 |
|
| 33 |
/* |
| 34 |
** ldff1sh_gather_m2_u64_offset: |
| 35 |
** mov (x[0-9]+), #?-2 |
| 36 |
** ldff1sh z0\.d, p0/z, \[\1, z0\.d\] |
| 37 |
** ret |
| 38 |
*/ |
| 39 |
TEST_LOAD_GATHER_ZS (ldff1sh_gather_m2_u64_offset, svuint64_t, svuint64_t, |
| 40 |
z0_res = svldff1sh_gather_u64base_offset_u64 (p0, z0, -2), |
| 41 |
z0_res = svldff1sh_gather_offset_u64 (p0, z0, -2)) |
| 42 |
|
| 43 |
/* |
| 44 |
** ldff1sh_gather_0_u64_offset: |
| 45 |
** ldff1sh z0\.d, p0/z, \[z0\.d\] |
| 46 |
** ret |
| 47 |
*/ |
| 48 |
TEST_LOAD_GATHER_ZS (ldff1sh_gather_0_u64_offset, svuint64_t, svuint64_t, |
| 49 |
z0_res = svldff1sh_gather_u64base_offset_u64 (p0, z0, 0), |
| 50 |
z0_res = svldff1sh_gather_offset_u64 (p0, z0, 0)) |
| 51 |
|
| 52 |
/* |
| 53 |
** ldff1sh_gather_5_u64_offset: |
| 54 |
** mov (x[0-9]+), #?5 |
| 55 |
** ldff1sh z0\.d, p0/z, \[\1, z0\.d\] |
| 56 |
** ret |
| 57 |
*/ |
| 58 |
TEST_LOAD_GATHER_ZS (ldff1sh_gather_5_u64_offset, svuint64_t, svuint64_t, |
| 59 |
z0_res = svldff1sh_gather_u64base_offset_u64 (p0, z0, 5), |
| 60 |
z0_res = svldff1sh_gather_offset_u64 (p0, z0, 5)) |
| 61 |
|
| 62 |
/* |
| 63 |
** ldff1sh_gather_6_u64_offset: |
| 64 |
** ldff1sh z0\.d, p0/z, \[z0\.d, #6\] |
| 65 |
** ret |
| 66 |
*/ |
| 67 |
TEST_LOAD_GATHER_ZS (ldff1sh_gather_6_u64_offset, svuint64_t, svuint64_t, |
| 68 |
z0_res = svldff1sh_gather_u64base_offset_u64 (p0, z0, 6), |
| 69 |
z0_res = svldff1sh_gather_offset_u64 (p0, z0, 6)) |
| 70 |
|
| 71 |
/* |
| 72 |
** ldff1sh_gather_62_u64_offset: |
| 73 |
** ldff1sh z0\.d, p0/z, \[z0\.d, #62\] |
| 74 |
** ret |
| 75 |
*/ |
| 76 |
TEST_LOAD_GATHER_ZS (ldff1sh_gather_62_u64_offset, svuint64_t, svuint64_t, |
| 77 |
z0_res = svldff1sh_gather_u64base_offset_u64 (p0, z0, 62), |
| 78 |
z0_res = svldff1sh_gather_offset_u64 (p0, z0, 62)) |
| 79 |
|
| 80 |
/* |
| 81 |
** ldff1sh_gather_64_u64_offset: |
| 82 |
** mov (x[0-9]+), #?64 |
| 83 |
** ldff1sh z0\.d, p0/z, \[\1, z0\.d\] |
| 84 |
** ret |
| 85 |
*/ |
| 86 |
TEST_LOAD_GATHER_ZS (ldff1sh_gather_64_u64_offset, svuint64_t, svuint64_t, |
| 87 |
z0_res = svldff1sh_gather_u64base_offset_u64 (p0, z0, 64), |
| 88 |
z0_res = svldff1sh_gather_offset_u64 (p0, z0, 64)) |
| 89 |
|
| 90 |
/* |
| 91 |
** ldff1sh_gather_x0_u64_index: |
| 92 |
** lsl (x[0-9]+), x0, #?1 |
| 93 |
** ldff1sh z0\.d, p0/z, \[\1, z0\.d\] |
| 94 |
** ret |
| 95 |
*/ |
| 96 |
TEST_LOAD_GATHER_ZS (ldff1sh_gather_x0_u64_index, svuint64_t, svuint64_t, |
| 97 |
z0_res = svldff1sh_gather_u64base_index_u64 (p0, z0, x0), |
| 98 |
z0_res = svldff1sh_gather_index_u64 (p0, z0, x0)) |
| 99 |
|
| 100 |
/* |
| 101 |
** ldff1sh_gather_m1_u64_index: |
| 102 |
** mov (x[0-9]+), #?-2 |
| 103 |
** ldff1sh z0\.d, p0/z, \[\1, z0\.d\] |
| 104 |
** ret |
| 105 |
*/ |
| 106 |
TEST_LOAD_GATHER_ZS (ldff1sh_gather_m1_u64_index, svuint64_t, svuint64_t, |
| 107 |
z0_res = svldff1sh_gather_u64base_index_u64 (p0, z0, -1), |
| 108 |
z0_res = svldff1sh_gather_index_u64 (p0, z0, -1)) |
| 109 |
|
| 110 |
/* |
| 111 |
** ldff1sh_gather_0_u64_index: |
| 112 |
** ldff1sh z0\.d, p0/z, \[z0\.d\] |
| 113 |
** ret |
| 114 |
*/ |
| 115 |
TEST_LOAD_GATHER_ZS (ldff1sh_gather_0_u64_index, svuint64_t, svuint64_t, |
| 116 |
z0_res = svldff1sh_gather_u64base_index_u64 (p0, z0, 0), |
| 117 |
z0_res = svldff1sh_gather_index_u64 (p0, z0, 0)) |
| 118 |
|
| 119 |
/* |
| 120 |
** ldff1sh_gather_5_u64_index: |
| 121 |
** ldff1sh z0\.d, p0/z, \[z0\.d, #10\] |
| 122 |
** ret |
| 123 |
*/ |
| 124 |
TEST_LOAD_GATHER_ZS (ldff1sh_gather_5_u64_index, svuint64_t, svuint64_t, |
| 125 |
z0_res = svldff1sh_gather_u64base_index_u64 (p0, z0, 5), |
| 126 |
z0_res = svldff1sh_gather_index_u64 (p0, z0, 5)) |
| 127 |
|
| 128 |
/* |
| 129 |
** ldff1sh_gather_31_u64_index: |
| 130 |
** ldff1sh z0\.d, p0/z, \[z0\.d, #62\] |
| 131 |
** ret |
| 132 |
*/ |
| 133 |
TEST_LOAD_GATHER_ZS (ldff1sh_gather_31_u64_index, svuint64_t, svuint64_t, |
| 134 |
z0_res = svldff1sh_gather_u64base_index_u64 (p0, z0, 31), |
| 135 |
z0_res = svldff1sh_gather_index_u64 (p0, z0, 31)) |
| 136 |
|
| 137 |
/* |
| 138 |
** ldff1sh_gather_32_u64_index: |
| 139 |
** mov (x[0-9]+), #?64 |
| 140 |
** ldff1sh z0\.d, p0/z, \[\1, z0\.d\] |
| 141 |
** ret |
| 142 |
*/ |
| 143 |
TEST_LOAD_GATHER_ZS (ldff1sh_gather_32_u64_index, svuint64_t, svuint64_t, |
| 144 |
z0_res = svldff1sh_gather_u64base_index_u64 (p0, z0, 32), |
| 145 |
z0_res = svldff1sh_gather_index_u64 (p0, z0, 32)) |
| 146 |
|
| 147 |
/* |
| 148 |
** ldff1sh_gather_x0_u64_s64offset: |
| 149 |
** ldff1sh z0\.d, p0/z, \[x0, z0\.d\] |
| 150 |
** ret |
| 151 |
*/ |
| 152 |
TEST_LOAD_GATHER_SZ (ldff1sh_gather_x0_u64_s64offset, svuint64_t, int16_t, svint64_t, |
| 153 |
z0_res = svldff1sh_gather_s64offset_u64 (p0, x0, z0), |
| 154 |
z0_res = svldff1sh_gather_offset_u64 (p0, x0, z0)) |
| 155 |
|
| 156 |
/* |
| 157 |
** ldff1sh_gather_tied1_u64_s64offset: |
| 158 |
** ldff1sh z0\.d, p0/z, \[x0, z0\.d\] |
| 159 |
** ret |
| 160 |
*/ |
| 161 |
TEST_LOAD_GATHER_SZ (ldff1sh_gather_tied1_u64_s64offset, svuint64_t, int16_t, svint64_t, |
| 162 |
z0_res = svldff1sh_gather_s64offset_u64 (p0, x0, z0), |
| 163 |
z0_res = svldff1sh_gather_offset_u64 (p0, x0, z0)) |
| 164 |
|
| 165 |
/* |
| 166 |
** ldff1sh_gather_untied_u64_s64offset: |
| 167 |
** ldff1sh z0\.d, p0/z, \[x0, z1\.d\] |
| 168 |
** ret |
| 169 |
*/ |
| 170 |
TEST_LOAD_GATHER_SZ (ldff1sh_gather_untied_u64_s64offset, svuint64_t, int16_t, svint64_t, |
| 171 |
z0_res = svldff1sh_gather_s64offset_u64 (p0, x0, z1), |
| 172 |
z0_res = svldff1sh_gather_offset_u64 (p0, x0, z1)) |
| 173 |
|
| 174 |
/* |
| 175 |
** ldff1sh_gather_ext_u64_s64offset: |
| 176 |
** ldff1sh z0\.d, p0/z, \[x0, z1\.d, sxtw\] |
| 177 |
** ret |
| 178 |
*/ |
| 179 |
TEST_LOAD_GATHER_SZ (ldff1sh_gather_ext_u64_s64offset, svuint64_t, int16_t, svint64_t, |
| 180 |
z0_res = svldff1sh_gather_s64offset_u64 (p0, x0, svextw_s64_x (p0, z1)), |
| 181 |
z0_res = svldff1sh_gather_offset_u64 (p0, x0, svextw_x (p0, z1))) |
| 182 |
|
| 183 |
/* |
| 184 |
** ldff1sh_gather_x0_u64_u64offset: |
| 185 |
** ldff1sh z0\.d, p0/z, \[x0, z0\.d\] |
| 186 |
** ret |
| 187 |
*/ |
| 188 |
TEST_LOAD_GATHER_SZ (ldff1sh_gather_x0_u64_u64offset, svuint64_t, int16_t, svuint64_t, |
| 189 |
z0_res = svldff1sh_gather_u64offset_u64 (p0, x0, z0), |
| 190 |
z0_res = svldff1sh_gather_offset_u64 (p0, x0, z0)) |
| 191 |
|
| 192 |
/* |
| 193 |
** ldff1sh_gather_tied1_u64_u64offset: |
| 194 |
** ldff1sh z0\.d, p0/z, \[x0, z0\.d\] |
| 195 |
** ret |
| 196 |
*/ |
| 197 |
TEST_LOAD_GATHER_SZ (ldff1sh_gather_tied1_u64_u64offset, svuint64_t, int16_t, svuint64_t, |
| 198 |
z0_res = svldff1sh_gather_u64offset_u64 (p0, x0, z0), |
| 199 |
z0_res = svldff1sh_gather_offset_u64 (p0, x0, z0)) |
| 200 |
|
| 201 |
/* |
| 202 |
** ldff1sh_gather_untied_u64_u64offset: |
| 203 |
** ldff1sh z0\.d, p0/z, \[x0, z1\.d\] |
| 204 |
** ret |
| 205 |
*/ |
| 206 |
TEST_LOAD_GATHER_SZ (ldff1sh_gather_untied_u64_u64offset, svuint64_t, int16_t, svuint64_t, |
| 207 |
z0_res = svldff1sh_gather_u64offset_u64 (p0, x0, z1), |
| 208 |
z0_res = svldff1sh_gather_offset_u64 (p0, x0, z1)) |
| 209 |
|
| 210 |
/* |
| 211 |
** ldff1sh_gather_ext_u64_u64offset: |
| 212 |
** ldff1sh z0\.d, p0/z, \[x0, z1\.d, uxtw\] |
| 213 |
** ret |
| 214 |
*/ |
| 215 |
TEST_LOAD_GATHER_SZ (ldff1sh_gather_ext_u64_u64offset, svuint64_t, int16_t, svuint64_t, |
| 216 |
z0_res = svldff1sh_gather_u64offset_u64 (p0, x0, svextw_u64_x (p0, z1)), |
| 217 |
z0_res = svldff1sh_gather_offset_u64 (p0, x0, svextw_x (p0, z1))) |
| 218 |
|
| 219 |
/* |
| 220 |
** ldff1sh_gather_x0_u64_s64index: |
| 221 |
** ldff1sh z0\.d, p0/z, \[x0, z0\.d, lsl 1\] |
| 222 |
** ret |
| 223 |
*/ |
| 224 |
TEST_LOAD_GATHER_SZ (ldff1sh_gather_x0_u64_s64index, svuint64_t, int16_t, svint64_t, |
| 225 |
z0_res = svldff1sh_gather_s64index_u64 (p0, x0, z0), |
| 226 |
z0_res = svldff1sh_gather_index_u64 (p0, x0, z0)) |
| 227 |
|
| 228 |
/* |
| 229 |
** ldff1sh_gather_tied1_u64_s64index: |
| 230 |
** ldff1sh z0\.d, p0/z, \[x0, z0\.d, lsl 1\] |
| 231 |
** ret |
| 232 |
*/ |
| 233 |
TEST_LOAD_GATHER_SZ (ldff1sh_gather_tied1_u64_s64index, svuint64_t, int16_t, svint64_t, |
| 234 |
z0_res = svldff1sh_gather_s64index_u64 (p0, x0, z0), |
| 235 |
z0_res = svldff1sh_gather_index_u64 (p0, x0, z0)) |
| 236 |
|
| 237 |
/* |
| 238 |
** ldff1sh_gather_untied_u64_s64index: |
| 239 |
** ldff1sh z0\.d, p0/z, \[x0, z1\.d, lsl 1\] |
| 240 |
** ret |
| 241 |
*/ |
| 242 |
TEST_LOAD_GATHER_SZ (ldff1sh_gather_untied_u64_s64index, svuint64_t, int16_t, svint64_t, |
| 243 |
z0_res = svldff1sh_gather_s64index_u64 (p0, x0, z1), |
| 244 |
z0_res = svldff1sh_gather_index_u64 (p0, x0, z1)) |
| 245 |
|
| 246 |
/* |
| 247 |
** ldff1sh_gather_ext_u64_s64index: |
| 248 |
** ldff1sh z0\.d, p0/z, \[x0, z1\.d, sxtw 1\] |
| 249 |
** ret |
| 250 |
*/ |
| 251 |
TEST_LOAD_GATHER_SZ (ldff1sh_gather_ext_u64_s64index, svuint64_t, int16_t, svint64_t, |
| 252 |
z0_res = svldff1sh_gather_s64index_u64 (p0, x0, svextw_s64_x (p0, z1)), |
| 253 |
z0_res = svldff1sh_gather_index_u64 (p0, x0, svextw_x (p0, z1))) |
| 254 |
|
| 255 |
/* |
| 256 |
** ldff1sh_gather_x0_u64_u64index: |
| 257 |
** ldff1sh z0\.d, p0/z, \[x0, z0\.d, lsl 1\] |
| 258 |
** ret |
| 259 |
*/ |
| 260 |
TEST_LOAD_GATHER_SZ (ldff1sh_gather_x0_u64_u64index, svuint64_t, int16_t, svuint64_t, |
| 261 |
z0_res = svldff1sh_gather_u64index_u64 (p0, x0, z0), |
| 262 |
z0_res = svldff1sh_gather_index_u64 (p0, x0, z0)) |
| 263 |
|
| 264 |
/* |
| 265 |
** ldff1sh_gather_tied1_u64_u64index: |
| 266 |
** ldff1sh z0\.d, p0/z, \[x0, z0\.d, lsl 1\] |
| 267 |
** ret |
| 268 |
*/ |
| 269 |
TEST_LOAD_GATHER_SZ (ldff1sh_gather_tied1_u64_u64index, svuint64_t, int16_t, svuint64_t, |
| 270 |
z0_res = svldff1sh_gather_u64index_u64 (p0, x0, z0), |
| 271 |
z0_res = svldff1sh_gather_index_u64 (p0, x0, z0)) |
| 272 |
|
| 273 |
/* |
| 274 |
** ldff1sh_gather_untied_u64_u64index: |
| 275 |
** ldff1sh z0\.d, p0/z, \[x0, z1\.d, lsl 1\] |
| 276 |
** ret |
| 277 |
*/ |
| 278 |
TEST_LOAD_GATHER_SZ (ldff1sh_gather_untied_u64_u64index, svuint64_t, int16_t, svuint64_t, |
| 279 |
z0_res = svldff1sh_gather_u64index_u64 (p0, x0, z1), |
| 280 |
z0_res = svldff1sh_gather_index_u64 (p0, x0, z1)) |
| 281 |
|
| 282 |
/* |
| 283 |
** ldff1sh_gather_ext_u64_u64index: |
| 284 |
** ldff1sh z0\.d, p0/z, \[x0, z1\.d, uxtw 1\] |
| 285 |
** ret |
| 286 |
*/ |
| 287 |
TEST_LOAD_GATHER_SZ (ldff1sh_gather_ext_u64_u64index, svuint64_t, int16_t, svuint64_t, |
| 288 |
z0_res = svldff1sh_gather_u64index_u64 (p0, x0, svextw_u64_x (p0, z1)), |
| 289 |
z0_res = svldff1sh_gather_index_u64 (p0, x0, svextw_x (p0, z1))) |