Implemented `Shuffle` for the Cranelift interpreter, to shuffle two SIMD vectors together based on an immediate mask of 16 bytes. Copyright (c) 2021, Arm Limited
13 lines
396 B
Plaintext
13 lines
396 B
Plaintext
test interpret
|
|
test run
|
|
target aarch64
|
|
set enable_simd
|
|
target x86_64
|
|
|
|
function %shuffle_i8x16(i8x16, i8x16) -> i8x16 {
|
|
block0(v0: i8x16, v1: i8x16):
|
|
v2 = shuffle v0, v1, [3 0 31 26 100 6 12 11 23 13 24 4 2 15 17 5]
|
|
return v2
|
|
}
|
|
; run: %shuffle_i8x16([1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16], [17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32]) == [4 1 32 27 0 7 13 12 24 14 25 5 3 16 18 6]
|