Skip to content

Commit 9b69e04

Browse files
committed
AArch64: Synchronize clean and optimized assembly
The commits - "AArch64: Use alignment-safe Neon stores in rej_uniform" (6dc035b) - "AArch64 rej_uniform: Remove three dead instructions" (9c442c4) introduced changes to the optimized versions of the AArch64 backend that were not backported to the clean versions. This commit conducts such backports. Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>
1 parent 3abd699 commit 9b69e04

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

dev/aarch64_clean/src/rej_uniform_aarch64_asm.S

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -285,16 +285,16 @@ rej_uniform_loop48:
285285
tbl val2.16b, {val2.16b}, table2.16b
286286
tbl val3.16b, {val3.16b}, table3.16b
287287

288-
str val0q, [output_tmp]
288+
st1 {val0.8h}, [output_tmp]
289289
add output_tmp, output_tmp, ctr0, lsl #1
290290

291-
str val1q, [output_tmp]
291+
st1 {val1.8h}, [output_tmp]
292292
add output_tmp, output_tmp, ctr1, lsl #1
293293

294-
str val2q, [output_tmp]
294+
st1 {val2.8h}, [output_tmp]
295295
add output_tmp, output_tmp, ctr2, lsl #1
296296

297-
str val3q, [output_tmp]
297+
st1 {val3.8h}, [output_tmp]
298298
add output_tmp, output_tmp, ctr3, lsl #1
299299

300300
add ctr01, ctr0, ctr1
@@ -313,7 +313,6 @@ rej_uniform_loop48_end:
313313
cmp buflen, #24
314314
b.lo rej_uniform_memory_copy
315315

316-
sub buflen, buflen, #24
317316
ld3 {buf0.8b, buf1.8b, buf2.8b}, [buf], #24
318317

319318
zip1 tmp0.16b, buf0.16b, buf1.16b
@@ -352,11 +351,10 @@ rej_uniform_loop48_end:
352351
tbl val0.16b, {val0.16b}, table0.16b
353352
tbl val1.16b, {val1.16b}, table1.16b
354353

355-
str val0q, [output_tmp]
354+
st1 {val0.8h}, [output_tmp]
356355
add output_tmp, output_tmp, ctr0, lsl #1
357356

358-
str val1q, [output_tmp]
359-
add output_tmp, output_tmp, ctr1, lsl #1
357+
st1 {val1.8h}, [output_tmp]
360358

361359
add count, count, ctr0
362360
add count, count, ctr1
@@ -385,7 +383,6 @@ rej_uniform_final_copy:
385383
b.lt rej_uniform_final_copy
386384

387385
mov x0, count
388-
b rej_uniform_return
389386

390387
rej_uniform_return:
391388
pop_stack

0 commit comments

Comments
 (0)