Debian Codegraph @

internal/integration_test/spectest/v2/testdata/simd_select.wast

raw
1 ;; Test SIMD select instuction
2
3 (module
4 (func (export "select_v128_i32") (param v128 v128 i32) (result v128)
5 (select (local.get 0) (local.get 1) (local.get 2))
6 )
7 )
8
9 (assert_return
10 (invoke "select_v128_i32"
11 (v128.const i32x4 1 2 3 4)
12 (v128.const i32x4 5 6 7 8)
13 (i32.const 1)
14 )
15 (v128.const i32x4 1 2 3 4)
16 )
17
18 (assert_return
19 (invoke "select_v128_i32"
20 (v128.const i32x4 1 2 3 4)
21 (v128.const i32x4 5 6 7 8)
22 (i32.const 0)
23 )
24 (v128.const i32x4 5 6 7 8)
25 )
26
27 (assert_return
28 (invoke "select_v128_i32"
29 (v128.const f32x4 1.0 2.0 3.0 4.0)
30 (v128.const f32x4 5.0 6.0 7.0 8.0)
31 (i32.const -1)
32 )
33 (v128.const f32x4 1.0 2.0 3.0 4.0)
34 )
35
36 (assert_return
37 (invoke "select_v128_i32"
38 (v128.const f32x4 -1.5 -2.5 -3.5 -4.5)
39 (v128.const f32x4 9.5 8.5 7.5 6.5)
40 (i32.const 0)
41 )
42 (v128.const f32x4 9.5 8.5 7.5 6.5)
43 )
44
45 (assert_return
46 (invoke "select_v128_i32"
47 (v128.const i8x16 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16)
48 (v128.const i8x16 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1)
49 (i32.const 123)
50 )
51 (v128.const i8x16 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16)
52 )
53
54 (assert_return
55 (invoke "select_v128_i32"
56 (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
57 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
58 (i32.const 0)
59 )
60 (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
61 )