Files
wasmtime/cranelift/wasm/wasmtests/simd-store.wat
Alex Crichton 86bc37f26e Fix validating wasm stores of boolean vector results (#3202)
Previously cranelift's wasm code generator would emit a raw `store`
instruction for all wasm types, regardless of what the cranelift operand
type was. Cranelift's `store` instruction, however, isn't valid for
boolean vector types. This commit fixes this issue by inserting a
bitcast specifically for the store instruction if a boolean vector type
is being stored, continuing to avoid the bitcast for all other vector types.

Closes #3099
2021-08-18 12:16:50 -05:00

84 lines
3.1 KiB
Plaintext

(module
(func (param v128)
(v128.store (i32.const 0) (i8x16.eq (local.get 0) (local.get 0))))
(func (param v128)
(v128.store (i32.const 0) (i16x8.eq (local.get 0) (local.get 0))))
(func (param v128)
(v128.store (i32.const 0) (i32x4.eq (local.get 0) (local.get 0))))
(func (param v128)
(v128.store (i32.const 0) (i64x2.eq (local.get 0) (local.get 0))))
(func (param v128)
(v128.store (i32.const 0) (i8x16.ne (local.get 0) (local.get 0))))
(func (param v128)
(v128.store (i32.const 0) (i16x8.ne (local.get 0) (local.get 0))))
(func (param v128)
(v128.store (i32.const 0) (i32x4.ne (local.get 0) (local.get 0))))
(func (param v128)
(v128.store (i32.const 0) (i64x2.ne (local.get 0) (local.get 0))))
(func (param v128)
(v128.store (i32.const 0) (i8x16.lt_s (local.get 0) (local.get 0))))
(func (param v128)
(v128.store (i32.const 0) (i16x8.lt_s (local.get 0) (local.get 0))))
(func (param v128)
(v128.store (i32.const 0) (i32x4.lt_s (local.get 0) (local.get 0))))
(func (param v128)
(v128.store (i32.const 0) (i64x2.lt_s (local.get 0) (local.get 0))))
(func (param v128)
(v128.store (i32.const 0) (i8x16.lt_u (local.get 0) (local.get 0))))
(func (param v128)
(v128.store (i32.const 0) (i16x8.lt_u (local.get 0) (local.get 0))))
(func (param v128)
(v128.store (i32.const 0) (i32x4.lt_u (local.get 0) (local.get 0))))
(func (param v128)
(v128.store (i32.const 0) (i8x16.gt_s (local.get 0) (local.get 0))))
(func (param v128)
(v128.store (i32.const 0) (i16x8.gt_s (local.get 0) (local.get 0))))
(func (param v128)
(v128.store (i32.const 0) (i32x4.gt_s (local.get 0) (local.get 0))))
(func (param v128)
(v128.store (i32.const 0) (i64x2.gt_s (local.get 0) (local.get 0))))
(func (param v128)
(v128.store (i32.const 0) (i8x16.gt_u (local.get 0) (local.get 0))))
(func (param v128)
(v128.store (i32.const 0) (i16x8.gt_u (local.get 0) (local.get 0))))
(func (param v128)
(v128.store (i32.const 0) (i32x4.gt_u (local.get 0) (local.get 0))))
(func (param v128)
(v128.store (i32.const 0) (f32x4.eq (local.get 0) (local.get 0))))
(func (param v128)
(v128.store (i32.const 0) (f64x2.eq (local.get 0) (local.get 0))))
(func (param v128)
(v128.store (i32.const 0) (f32x4.ne (local.get 0) (local.get 0))))
(func (param v128)
(v128.store (i32.const 0) (f64x2.ne (local.get 0) (local.get 0))))
(func (param v128)
(v128.store (i32.const 0) (f32x4.lt (local.get 0) (local.get 0))))
(func (param v128)
(v128.store (i32.const 0) (f64x2.lt (local.get 0) (local.get 0))))
(func (param v128)
(v128.store (i32.const 0) (f32x4.le (local.get 0) (local.get 0))))
(func (param v128)
(v128.store (i32.const 0) (f64x2.le (local.get 0) (local.get 0))))
(func (param v128)
(v128.store (i32.const 0) (f32x4.gt (local.get 0) (local.get 0))))
(func (param v128)
(v128.store (i32.const 0) (f64x2.gt (local.get 0) (local.get 0))))
(func (param v128)
(v128.store (i32.const 0) (f32x4.ge (local.get 0) (local.get 0))))
(func (param v128)
(v128.store (i32.const 0) (f64x2.ge (local.get 0) (local.get 0))))
(memory 0)
)