Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cranelift/codegen/meta/src/shared/instructions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ fn define_simd_lane_access(
);
let x = &Operand::new("x", I8x16).with_doc("Vector to modify by re-arranging lanes");
let y = &Operand::new("y", I8x16).with_doc("Mask for re-arranging lanes");
let a = &Operand::new("a", I8x16);

ig.push(
Inst::new(
Expand All @@ -388,6 +389,7 @@ fn define_simd_lane_access(
let x = &Operand::new("x", TxN).with_doc("The vector to modify");
let y = &Operand::new("y", &TxN.lane_of()).with_doc("New lane value");
let Idx = &Operand::new("Idx", &imm.uimm8).with_doc("Lane index");
let a = &Operand::new("a", TxN);

ig.push(
Inst::new(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function %swizzle() -> i8x16 {
block0:
v0 = vconst.i8x16 [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15]
v1 = vconst.i8x16 [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15]
v2 = swizzle.i8x16 v0, v1
v2 = swizzle v0, v1
return v2
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ target s390x

function %swizzle(i8x16, i8x16) -> i8x16 wasmtime_system_v {
block0(v0: i8x16, v1: i8x16):
v2 = swizzle.i8x16 v0, v1
v2 = swizzle v0, v1
return v2
}

Expand Down
2 changes: 1 addition & 1 deletion cranelift/filetests/filetests/isa/s390x/vec-permute.clif
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ target s390x

function %swizzle(i8x16, i8x16) -> i8x16 {
block0(v0: i8x16, v1: i8x16):
v2 = swizzle.i8x16 v0, v1
v2 = swizzle v0, v1
return v2
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function %swizzle() -> i8x16 {
block0:
v0 = vconst.i8x16 [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15]
v1 = vconst.i8x16 [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15]
v2 = swizzle.i8x16 v0, v1
v2 = swizzle v0, v1
return v2
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ block0:

function %swizzle(i8x16, i8x16) -> i8x16 {
block0(v0: i8x16, v1: i8x16):
v2 = swizzle.i8x16 v0, v1
v2 = swizzle v0, v1
return v2
}
; reverse the lanes, with over-large index 42 using lane 0
Expand Down
2 changes: 1 addition & 1 deletion cranelift/filetests/filetests/runtests/simd-swizzle.clif
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ target x86_64 has_sse3 has_ssse3 has_sse41

function %swizzle_i8x16(i8x16, i8x16) -> i8x16 {
block0(v0: i8x16, v1: i8x16):
v2 = swizzle.i8x16 v0, v1
v2 = swizzle v0, v1
return v2
}
; run: %swizzle_i8x16([1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16], [0 9 15 1 6 13 7 11 10 8 100 12 4 2 3 5]) == [1 10 16 2 7 14 8 12 11 9 0 13 5 3 4 6]
Expand Down
2 changes: 1 addition & 1 deletion cranelift/interpreter/src/step.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@ where
new[i] = x[s[i] as usize];
} // else leave as 0
}
assign(Value::vector(new, ctrl_ty)?)
assign(Value::vector(new, types::I8X16)?)
}
Opcode::Splat => {
let mut new_vector = SimdVec::new();
Expand Down
2 changes: 1 addition & 1 deletion cranelift/wasm/src/code_translator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1678,7 +1678,7 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
}
Operator::I8x16Swizzle => {
let (a, b) = pop2_with_bitcast(state, I8X16, builder);
state.push1(builder.ins().swizzle(I8X16, a, b))
state.push1(builder.ins().swizzle(a, b))
}
Operator::I8x16Add | Operator::I16x8Add | Operator::I32x4Add | Operator::I64x2Add => {
let (a, b) = pop2_with_bitcast(state, type_of(op), builder);
Expand Down