diff options
author | Alon Zakai <azakai@google.com> | 2024-10-14 16:07:57 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-14 16:07:57 -0700 |
commit | 93883fde36ac158fd415dcd6dbd387dcfd928d3c (patch) | |
tree | 1284161055319916352d520645b12f412283dd48 /test/lit/passes/optimize-instructions-gc-extern.wast | |
parent | e201819761bd8ae21bd03b2656a15544f9e44c32 (diff) | |
download | binaryen-93883fde36ac158fd415dcd6dbd387dcfd928d3c.tar.gz binaryen-93883fde36ac158fd415dcd6dbd387dcfd928d3c.tar.bz2 binaryen-93883fde36ac158fd415dcd6dbd387dcfd928d3c.zip |
[WasmGC] OptimizeInstructions: Cancel out internalize+externalize pairs (#7005)
Diffstat (limited to 'test/lit/passes/optimize-instructions-gc-extern.wast')
-rw-r--r-- | test/lit/passes/optimize-instructions-gc-extern.wast | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/lit/passes/optimize-instructions-gc-extern.wast b/test/lit/passes/optimize-instructions-gc-extern.wast index 067efb0ec..633a18a33 100644 --- a/test/lit/passes/optimize-instructions-gc-extern.wast +++ b/test/lit/passes/optimize-instructions-gc-extern.wast @@ -85,4 +85,30 @@ ) ) ) + + ;; CHECK: (func $extern.intern (type $3) (param $ext externref) (param $any anyref) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (local.get $any) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (local.get $ext) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + (func $extern.intern (param $ext externref) (param $any anyref) + ;; Internalize/externalize operations cancel out. + (drop + (any.convert_extern + (extern.convert_any + (local.get $any) + ) + ) + ) + (drop + (extern.convert_any + (any.convert_extern + (local.get $ext) + ) + ) + ) + ) ) |