summaryrefslogtreecommitdiff
path: root/test/lit/passes/optimize-instructions-gc-iit.wast
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit/passes/optimize-instructions-gc-iit.wast')
-rw-r--r--test/lit/passes/optimize-instructions-gc-iit.wast18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/lit/passes/optimize-instructions-gc-iit.wast b/test/lit/passes/optimize-instructions-gc-iit.wast
index 10bbbfc4a..5409e14c4 100644
--- a/test/lit/passes/optimize-instructions-gc-iit.wast
+++ b/test/lit/passes/optimize-instructions-gc-iit.wast
@@ -136,4 +136,22 @@
)
)
)
+
+ ;; CHECK: (func $ref-eq-ref-cast (param $x eqref)
+ ;; CHECK-NEXT: (drop
+ ;; CHECK-NEXT: (i32.const 1)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ (func $ref-eq-ref-cast (param $x eqref)
+ ;; we can look through a ref.cast if we ignore traps
+ (drop
+ (ref.eq
+ (local.get $x)
+ (ref.cast
+ (local.get $x)
+ (rtt.canon $parent)
+ )
+ )
+ )
+ )
)