summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/example/c-api-kitchen-sink.c5
-rw-r--r--test/lit/passes/inlining_vacuum_optimize-instructions.wast5
-rw-r--r--test/lit/passes/optimize-instructions-gc-iit.wast15
-rw-r--r--test/lit/passes/signature-pruning.wast8
4 files changed, 23 insertions, 10 deletions
diff --git a/test/example/c-api-kitchen-sink.c b/test/example/c-api-kitchen-sink.c
index d20c76100..0dadeef1d 100644
--- a/test/example/c-api-kitchen-sink.c
+++ b/test/example/c-api-kitchen-sink.c
@@ -1105,9 +1105,8 @@ void test_core() {
BinaryenRefTest(module,
BinaryenGlobalGet(module, "i8Array-global", i8Array),
BinaryenTypeGetHeapType(i8Array)),
- BinaryenRefCast(module,
- BinaryenGlobalGet(module, "i8Array-global", i8Array),
- BinaryenTypeGetHeapType(i8Array)),
+ BinaryenRefCast(
+ module, BinaryenGlobalGet(module, "i8Array-global", i8Array), i8Array),
BinaryenStructNew(module, 0, 0, BinaryenTypeGetHeapType(i32Struct)),
BinaryenStructNew(module,
(BinaryenExpressionRef[]){makeInt32(module, 0)},
diff --git a/test/lit/passes/inlining_vacuum_optimize-instructions.wast b/test/lit/passes/inlining_vacuum_optimize-instructions.wast
index a559b3bff..fbf6aac69 100644
--- a/test/lit/passes/inlining_vacuum_optimize-instructions.wast
+++ b/test/lit/passes/inlining_vacuum_optimize-instructions.wast
@@ -19,7 +19,10 @@
;; CHECK: (func $target (type $ref?|$A|_=>_none) (param $0 (ref null $A))
;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (ref.cast $B
+ ;; CHECK-NEXT: (block ;; (replaces something unreachable we can't emit)
+ ;; CHECK-NEXT: (drop
+ ;; CHECK-NEXT: (unreachable)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
diff --git a/test/lit/passes/optimize-instructions-gc-iit.wast b/test/lit/passes/optimize-instructions-gc-iit.wast
index fc001b126..3a098c0b4 100644
--- a/test/lit/passes/optimize-instructions-gc-iit.wast
+++ b/test/lit/passes/optimize-instructions-gc-iit.wast
@@ -138,7 +138,10 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (ref.cast $parent
+ ;; CHECK-NEXT: (block ;; (replaces something unreachable we can't emit)
+ ;; CHECK-NEXT: (drop
+ ;; CHECK-NEXT: (unreachable)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -151,7 +154,10 @@
;; NOMNL-NEXT: )
;; NOMNL-NEXT: )
;; NOMNL-NEXT: (drop
- ;; NOMNL-NEXT: (ref.cast $parent
+ ;; NOMNL-NEXT: (block ;; (replaces something unreachable we can't emit)
+ ;; NOMNL-NEXT: (drop
+ ;; NOMNL-NEXT: (unreachable)
+ ;; NOMNL-NEXT: )
;; NOMNL-NEXT: (unreachable)
;; NOMNL-NEXT: )
;; NOMNL-NEXT: )
@@ -164,7 +170,10 @@
;; NOMNL-TNH-NEXT: )
;; NOMNL-TNH-NEXT: )
;; NOMNL-TNH-NEXT: (drop
- ;; NOMNL-TNH-NEXT: (ref.cast $parent
+ ;; NOMNL-TNH-NEXT: (block ;; (replaces something unreachable we can't emit)
+ ;; NOMNL-TNH-NEXT: (drop
+ ;; NOMNL-TNH-NEXT: (unreachable)
+ ;; NOMNL-TNH-NEXT: )
;; NOMNL-TNH-NEXT: (unreachable)
;; NOMNL-TNH-NEXT: )
;; NOMNL-TNH-NEXT: )
diff --git a/test/lit/passes/signature-pruning.wast b/test/lit/passes/signature-pruning.wast
index a21f67d8d..493b7237a 100644
--- a/test/lit/passes/signature-pruning.wast
+++ b/test/lit/passes/signature-pruning.wast
@@ -787,13 +787,15 @@
)
(module
+ (type $A (struct))
;; CHECK: (type $none_=>_none (func))
- ;; CHECK: (type $A (struct ))
- (type $A (struct))
;; CHECK: (func $0 (type $none_=>_none)
;; CHECK-NEXT: (local $0 f32)
- ;; CHECK-NEXT: (ref.cast $A
+ ;; CHECK-NEXT: (block ;; (replaces something unreachable we can't emit)
+ ;; CHECK-NEXT: (drop
+ ;; CHECK-NEXT: (unreachable)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
;; CHECK-NEXT: )