blob: f17479e53dbd843a8c28a089f5b0bd67a5af063f (
plain)
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
60
61
62
63
64
65
66
|
;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited.
;; RUN: wasm-opt %s --signext-lowering --enable-sign-ext -S -o - | filecheck %s
(module
;; CHECK: (type $0 (func))
(type $0 (func))
;; CHECK: (func $signext
;; CHECK-NEXT: (local $0 i32)
;; CHECK-NEXT: (local $1 i64)
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (i32.shr_s
;; CHECK-NEXT: (i32.shl
;; CHECK-NEXT: (local.get $0)
;; CHECK-NEXT: (i32.const 24)
;; CHECK-NEXT: )
;; CHECK-NEXT: (i32.const 24)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (i32.shr_s
;; CHECK-NEXT: (i32.shl
;; CHECK-NEXT: (local.get $0)
;; CHECK-NEXT: (i32.const 16)
;; CHECK-NEXT: )
;; CHECK-NEXT: (i32.const 16)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (i64.shr_s
;; CHECK-NEXT: (i64.shl
;; CHECK-NEXT: (local.get $1)
;; CHECK-NEXT: (i64.const 56)
;; CHECK-NEXT: )
;; CHECK-NEXT: (i64.const 56)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (i64.shr_s
;; CHECK-NEXT: (i64.shl
;; CHECK-NEXT: (local.get $1)
;; CHECK-NEXT: (i64.const 48)
;; CHECK-NEXT: )
;; CHECK-NEXT: (i64.const 48)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (i64.shr_s
;; CHECK-NEXT: (i64.shl
;; CHECK-NEXT: (local.get $1)
;; CHECK-NEXT: (i64.const 32)
;; CHECK-NEXT: )
;; CHECK-NEXT: (i64.const 32)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $signext (type $0)
(local $0 i32)
(local $1 i64)
(drop (i32.extend8_s (local.get $0)))
(drop (i32.extend16_s (local.get $0)))
(drop (i64.extend8_s (local.get $1)))
(drop (i64.extend16_s (local.get $1)))
(drop (i64.extend32_s (local.get $1)))
)
)
|