diff options
Diffstat (limited to 'test/lit/passes/optimize-instructions-atomics.wast')
-rw-r--r-- | test/lit/passes/optimize-instructions-atomics.wast | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/test/lit/passes/optimize-instructions-atomics.wast b/test/lit/passes/optimize-instructions-atomics.wast index 519c8399d..979afde68 100644 --- a/test/lit/passes/optimize-instructions-atomics.wast +++ b/test/lit/passes/optimize-instructions-atomics.wast @@ -51,4 +51,48 @@ (drop (f64.reinterpret_i64 (i64.atomic.load (local.get $x)))) ;; skip (i32.atomic.store (i32.const 8) (i32.reinterpret_f32 (local.get $y))) ;; skip ) + + ;; CHECK: (func $combine_atomic_load_and_extends (param $x i32) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (i64.atomic.load8_u + ;; CHECK-NEXT: (local.get $x) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (i64.atomic.load16_u + ;; CHECK-NEXT: (local.get $x) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (i64.atomic.load32_u + ;; CHECK-NEXT: (local.get $x) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (i64.atomic.load8_u + ;; CHECK-NEXT: (local.get $x) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (i64.atomic.load16_u + ;; CHECK-NEXT: (local.get $x) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (i64.extend_i32_s + ;; CHECK-NEXT: (i32.atomic.load + ;; CHECK-NEXT: (local.get $x) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + (func $combine_atomic_load_and_extends (param $x i32) + (drop (i64.extend_i32_u (i32.atomic.load8_u (local.get $x)))) + (drop (i64.extend_i32_u (i32.atomic.load16_u (local.get $x)))) + (drop (i64.extend_i32_u (i32.atomic.load (local.get $x)))) + (drop (i64.extend_i32_s (i32.atomic.load8_u (local.get $x)))) + (drop (i64.extend_i32_s (i32.atomic.load16_u (local.get $x)))) + ;; skips + (drop (i64.extend_i32_s (i32.atomic.load (local.get $x)))) + ) ) |