diff options
Diffstat (limited to 'test/lit/passes')
-rw-r--r-- | test/lit/passes/memory64-lowering.wast | 85 | ||||
-rw-r--r-- | test/lit/passes/table64-lowering.wast | 83 |
2 files changed, 84 insertions, 84 deletions
diff --git a/test/lit/passes/memory64-lowering.wast b/test/lit/passes/memory64-lowering.wast index 4f9d3d050..39723c71d 100644 --- a/test/lit/passes/memory64-lowering.wast +++ b/test/lit/passes/memory64-lowering.wast @@ -1,6 +1,9 @@ ;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. -;; RUN: foreach %s %t wasm-opt --memory64-lowering --enable-memory64 --enable-threads --enable-bulk-memory -S -o - | filecheck %s +;; RUN: foreach %s %t wasm-opt --memory64-lowering --enable-memory64 --enable-threads --enable-bulk-memory --enable-reference-types -S -o - | filecheck %s + +;; Check the --table64-lowering alias +;; RUN: foreach %s %t wasm-opt --table64-lowering --enable-memory64 --enable-threads --enable-bulk-memory --enable-reference-types -S -o - | filecheck %s (module ;; CHECK: (type $0 (func)) @@ -295,3 +298,83 @@ ;; CHECK: (memory $0 1 65536) (memory $0 i64 1 65537) ) + +(module + ;; CHECK: (type $0 (func)) + + ;; CHECK: (type $1 (func (result i64))) + + ;; CHECK: (table $t64 10 100 funcref) + (table $t64 i64 10 100 funcref) + + ;; CHECK: (table $t32 10 100 funcref) + + ;; CHECK: (elem $elem64 (table $t64) (i32.const 0) funcref (item (ref.null nofunc))) + (elem $elem64 (table $t64) (i64.const 0) funcref (ref.null func)) + + (table $t32 10 100 funcref) + ;; CHECK: (elem $elem32 (table $t32) (i32.const 0) funcref (item (ref.null nofunc))) + (elem $elem32 (table $t32) (i32.const 0) funcref (ref.null func)) + + ;; CHECK: (func $test_call_indirect + ;; CHECK-NEXT: (call_indirect $t64 (type $0) + ;; CHECK-NEXT: (i32.wrap_i64 + ;; CHECK-NEXT: (i64.const 0) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + (func $test_call_indirect + (call_indirect 0 (i64.const 0)) + ) + + ;; CHECK: (func $test_table_size (result i64) + ;; CHECK-NEXT: (i64.extend_i32_u + ;; CHECK-NEXT: (table.size $t64) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + (func $test_table_size (result i64) + (table.size $t64) + ) + + ;; CHECK: (func $test_table_grow (result i64) + ;; CHECK-NEXT: (i64.extend_i32_u + ;; CHECK-NEXT: (table.grow $t64 + ;; CHECK-NEXT: (ref.null nofunc) + ;; CHECK-NEXT: (i32.wrap_i64 + ;; CHECK-NEXT: (i64.const 10) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + (func $test_table_grow (result i64) + (table.grow $t64 (ref.null func) (i64.const 10)) + ) + + ;; CHECK: (func $test_table_fill + ;; CHECK-NEXT: (table.fill $t64 + ;; CHECK-NEXT: (i32.wrap_i64 + ;; CHECK-NEXT: (i64.const 0) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (ref.null nofunc) + ;; CHECK-NEXT: (i32.wrap_i64 + ;; CHECK-NEXT: (i64.const 10) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + (func $test_table_fill + (table.fill $t64 (i64.const 0) (ref.null func) (i64.const 10)) + ) + + ;; CHECK: (func $test_table_init + ;; CHECK-NEXT: (table.init $t64 $elem64 + ;; CHECK-NEXT: (i32.wrap_i64 + ;; CHECK-NEXT: (i64.const 0) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (i32.const 5) + ;; CHECK-NEXT: (i32.const 10) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + (func $test_table_init + (table.init $t64 $elem64 (i64.const 0) (i32.const 5) (i32.const 10)) + ) +) diff --git a/test/lit/passes/table64-lowering.wast b/test/lit/passes/table64-lowering.wast deleted file mode 100644 index f3aaf4ef8..000000000 --- a/test/lit/passes/table64-lowering.wast +++ /dev/null @@ -1,83 +0,0 @@ -;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. - -;; RUN: wasm-opt %s --enable-memory64 --enable-reference-types --enable-bulk-memory --table64-lowering -S -o - | filecheck %s - -(module - ;; CHECK: (type $0 (func)) - - ;; CHECK: (type $1 (func (result i64))) - - ;; CHECK: (table $t64 10 100 funcref) - (table $t64 i64 10 100 funcref) - - ;; CHECK: (table $t32 10 100 funcref) - - ;; CHECK: (elem $elem64 (table $t64) (i32.const 0) funcref (item (ref.null nofunc))) - (elem $elem64 (table $t64) (i64.const 0) funcref (ref.null func)) - - (table $t32 10 100 funcref) - ;; CHECK: (elem $elem32 (table $t32) (i32.const 0) funcref (item (ref.null nofunc))) - (elem $elem32 (table $t32) (i32.const 0) funcref (ref.null func)) - - ;; CHECK: (func $test_call_indirect - ;; CHECK-NEXT: (call_indirect $t64 (type $0) - ;; CHECK-NEXT: (i32.wrap_i64 - ;; CHECK-NEXT: (i64.const 0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $test_call_indirect - (call_indirect 0 (i64.const 0)) - ) - - ;; CHECK: (func $test_table_size (result i64) - ;; CHECK-NEXT: (i64.extend_i32_u - ;; CHECK-NEXT: (table.size $t64) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $test_table_size (result i64) - (table.size $t64) - ) - - ;; CHECK: (func $test_table_grow (result i64) - ;; CHECK-NEXT: (i64.extend_i32_u - ;; CHECK-NEXT: (table.grow $t64 - ;; CHECK-NEXT: (ref.null nofunc) - ;; CHECK-NEXT: (i32.wrap_i64 - ;; CHECK-NEXT: (i64.const 10) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $test_table_grow (result i64) - (table.grow $t64 (ref.null func) (i64.const 10)) - ) - - ;; CHECK: (func $test_table_fill - ;; CHECK-NEXT: (table.fill $t64 - ;; CHECK-NEXT: (i32.wrap_i64 - ;; CHECK-NEXT: (i64.const 0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (ref.null nofunc) - ;; CHECK-NEXT: (i32.wrap_i64 - ;; CHECK-NEXT: (i64.const 10) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $test_table_fill - (table.fill $t64 (i64.const 0) (ref.null func) (i64.const 10)) - ) - - ;; CHECK: (func $test_table_init - ;; CHECK-NEXT: (table.init $t64 $elem64 - ;; CHECK-NEXT: (i32.wrap_i64 - ;; CHECK-NEXT: (i64.const 0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (i32.const 5) - ;; CHECK-NEXT: (i32.const 10) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $test_table_init - (table.init $t64 $elem64 (i64.const 0) (i32.const 5) (i32.const 10)) - ) -) |