summaryrefslogtreecommitdiff
path: root/test/lit
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2022-09-28 11:30:56 -0700
committerGitHub <noreply@github.com>2022-09-28 18:30:56 +0000
commit7044da7fe6754c54bd7f4930eaa208e3081cabe3 (patch)
treed3b6169b8a56eb8e7eb2957b4f05f8c317468639 /test/lit
parent7aa2cb9990e7dd3de1ef5831ef8fad348734aa70 (diff)
downloadbinaryen-7044da7fe6754c54bd7f4930eaa208e3081cabe3.tar.gz
binaryen-7044da7fe6754c54bd7f4930eaa208e3081cabe3.tar.bz2
binaryen-7044da7fe6754c54bd7f4930eaa208e3081cabe3.zip
[GUFA] Fix haveIntersection on comparing nullable with non-nullable (#5089)
We compared types and not heap types, so a difference in nullability confused us. But at that point in the code, we've ruled out nulls, so we should focus on heap types only.
Diffstat (limited to 'test/lit')
-rw-r--r--test/lit/passes/gufa-refs.wast11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/lit/passes/gufa-refs.wast b/test/lit/passes/gufa-refs.wast
index 24ebda381..42f1b349d 100644
--- a/test/lit/passes/gufa-refs.wast
+++ b/test/lit/passes/gufa-refs.wast
@@ -2766,6 +2766,9 @@
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (drop
+ ;; CHECK-NEXT: (i32.const 0)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $ref.eq-zero (export "ref.eq-zero")
;; We do not track specific references, so only the types can be used here.
@@ -2791,6 +2794,14 @@
)
)
)
+ (drop
+ (ref.eq
+ (struct.new $struct
+ (i32.const 5)
+ )
+ (ref.null $struct)
+ )
+ )
)
;; CHECK: (func $ref.eq-unknown (type $i32_ref?|$struct|_ref?|$struct|_ref?|$other|_ref|$struct|_ref|$struct|_ref|$other|_=>_none) (param $x i32) (param $struct (ref null $struct)) (param $struct2 (ref null $struct)) (param $other (ref null $other)) (param $nn-struct (ref $struct)) (param $nn-struct2 (ref $struct)) (param $nn-other (ref $other))