File: issue_3327_bnot_lowering.wast

package info (click to toggle)
rust-wasmtime 26.0.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 48,492 kB
  • sloc: ansic: 4,003; sh: 561; javascript: 542; cpp: 254; asm: 175; ml: 96; makefile: 55
file content (59 lines) | stat: -rw-r--r-- 1,591 bytes parent folder | download | duplicates (3)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
(; See issue https://github.com/bytecodealliance/wasmtime/issues/3327 ;)

(module
  (func $v128_not (export "v128_not") (result v128)
    v128.const f32x4 0 0 0 0
    f32x4.abs
    v128.not)
)

(assert_return (invoke "v128_not") (v128.const i32x4 -1 -1 -1 -1))

;; from #3327
(module
  (func (result i32)
    v128.const i32x4 0xffffffff 0x80bfffff 0x80bf0a0a 0x80bf0a0a
    f64x2.promote_low_f32x4
    v128.not
    v128.not
    v128.not
    v128.not
    v128.not
    v128.not
    v128.not
    v128.const i32x4 0 0 0 0
    f64x2.gt
    v128.not
    i64x2.bitmask)
  (export "" (func 0)))
;; the f64x2.promote_low_f32x4 operation may or may not preserve the sign bit
;; on the NaN in the first operation. This leads to one of two results depending
;; on how platforms propagate NaN bits.
(assert_return (invoke "") (either (i32.const 0) (i32.const 1)))

;; from #3327
(module
  (type (func (param i32) (result i32)))
  (func (type 0) (param i32) (result i32)
    local.get 0
    i32x4.splat
    f64x2.abs
    v128.not
    i64x2.bitmask)
  (export "1" (func 0)))
(assert_return (invoke "1" (i32.const 0)) (i32.const 3))

(module
  (type (;0;) (func (result v128)))
  (func (;0;) (type 0) (result v128)
      v128.const i32x4 0x733c3e67 0x3c3e6776 0x3e677673 0x6776733c
      i64x2.abs
      i64x2.bitmask
      i8x16.splat
      v128.const i32x4 0x733c3e67 0x3c3e6776 0x3e677673 0x6776733c
      i64x2.ge_s
      f32x4.floor
      v128.not
      i16x8.extadd_pairwise_i8x16_u)
  (export "x" (func 0)))
(assert_return (invoke "x") (v128.const i32x4 0x01fe01fe 0x01fe01fe 0x01fe01fe 0x01fe01fe))