summaryrefslogtreecommitdiff
path: root/test/lit/passes/optimize-instructions-atomics.wast
blob: 83ad545ba09018c204ccc4b5c856117c0447e679 (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
;; NOTE: Assertions have been generated by update_lit_checks.py and should not be edited.
;; RUN: wasm-opt %s --optimize-instructions --enable-threads -S -o - | filecheck %s

(module
 (import "env" "memory" (memory $0 (shared 256 256)))

 ;; CHECK:      (func $x
 ;; CHECK-NEXT:  (drop
 ;; CHECK-NEXT:   (i32.shr_s
 ;; CHECK-NEXT:    (i32.shl
 ;; CHECK-NEXT:     (i32.atomic.load8_u
 ;; CHECK-NEXT:      (i32.const 100)
 ;; CHECK-NEXT:     )
 ;; CHECK-NEXT:     (i32.const 24)
 ;; CHECK-NEXT:    )
 ;; CHECK-NEXT:    (i32.const 24)
 ;; CHECK-NEXT:   )
 ;; CHECK-NEXT:  )
 ;; CHECK-NEXT: )
 (func $x
  (drop
   (i32.shr_s
    (i32.shl
     (i32.atomic.load8_u ;; can't be signed
      (i32.const 100)
     )
     (i32.const 24)
    )
    (i32.const 24)
   )
  )
 )
)