diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2022-07-08 14:31:25 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-08 14:31:25 -0700 |
commit | 395e9d43cc40f45b5388ddf1791cd2aa3249cec1 (patch) | |
tree | 1b7d9c45c66ba7b9aa1595c6b657463dbb1c943d /test/lit/isorecursive-output-ordering.wast | |
parent | fea11e95c67d51c464f00a5fcdfa6adb2c596f5e (diff) | |
download | binaryen-395e9d43cc40f45b5388ddf1791cd2aa3249cec1.tar.gz binaryen-395e9d43cc40f45b5388ddf1791cd2aa3249cec1.tar.bz2 binaryen-395e9d43cc40f45b5388ddf1791cd2aa3249cec1.zip |
Parse `rec` in update_lit_checks.py (#4784)
Diffstat (limited to 'test/lit/isorecursive-output-ordering.wast')
-rw-r--r-- | test/lit/isorecursive-output-ordering.wast | 77 |
1 files changed, 44 insertions, 33 deletions
diff --git a/test/lit/isorecursive-output-ordering.wast b/test/lit/isorecursive-output-ordering.wast index ae965123f..acca04969 100644 --- a/test/lit/isorecursive-output-ordering.wast +++ b/test/lit/isorecursive-output-ordering.wast @@ -1,4 +1,4 @@ -;; TODO: Autogenerate these checks! The current script cannot handle `rec`. +;; NOTE: Assertions have been generated by update_lit_checks.py and should not be edited. ;; RUN: foreach %s %t wasm-opt -all --hybrid -S -o - | filecheck %s ;; RUN: foreach %s %t wasm-opt -all --hybrid --roundtrip -S -o - | filecheck %s @@ -6,26 +6,25 @@ (module ;; Test that we order groups by average uses. - ;; CHECK: (rec - ;; CHECK-NEXT: (type $unused-6 (struct_subtype data)) - ;; CHECK-NEXT: (type $used-a-bit (struct_subtype data)) - ;; CHECK-NEXT: ) - - ;; CHECK-NEXT: (rec - ;; CHECK-NEXT: (type $unused-1 (struct_subtype data)) - ;; CHECK-NEXT: (type $unused-2 (struct_subtype data)) - ;; CHECK-NEXT: (type $unused-3 (struct_subtype data)) - ;; CHECK-NEXT: (type $unused-4 (struct_subtype data)) - ;; CHECK-NEXT: (type $used-a-lot (struct_subtype data)) - ;; CHECK-NEXT: (type $unused-5 (struct_subtype data)) - ;; CHECK-NEXT: ) (rec + ;; CHECK: (rec + ;; CHECK-NEXT: (type $unused-6 (struct_subtype data)) + + ;; CHECK: (type $used-a-bit (struct_subtype data)) + + ;; CHECK: (rec + ;; CHECK-NEXT: (type $unused-1 (struct_subtype data)) (type $unused-1 (struct_subtype data)) + ;; CHECK: (type $unused-2 (struct_subtype data)) (type $unused-2 (struct_subtype data)) + ;; CHECK: (type $unused-3 (struct_subtype data)) (type $unused-3 (struct_subtype data)) + ;; CHECK: (type $unused-4 (struct_subtype data)) (type $unused-4 (struct_subtype data)) + ;; CHECK: (type $used-a-lot (struct_subtype data)) (type $used-a-lot (struct_subtype data)) + ;; CHECK: (type $unused-5 (struct_subtype data)) (type $unused-5 (struct_subtype data)) ) @@ -34,6 +33,9 @@ (type $used-a-bit (struct_subtype data)) ) + ;; CHECK: (func $use (type $ref|$used-a-lot|_ref|$used-a-lot|_ref|$used-a-lot|_ref|$used-a-lot|_ref|$used-a-lot|_ref|$used-a-lot|_=>_ref|$used-a-bit|_ref|$used-a-bit|_ref|$used-a-bit|_ref|$used-a-bit|) (param $0 (ref $used-a-lot)) (param $1 (ref $used-a-lot)) (param $2 (ref $used-a-lot)) (param $3 (ref $used-a-lot)) (param $4 (ref $used-a-lot)) (param $5 (ref $used-a-lot)) (result (ref $used-a-bit) (ref $used-a-bit) (ref $used-a-bit) (ref $used-a-bit)) + ;; CHECK-NEXT: (unreachable) + ;; CHECK-NEXT: ) (func $use (param (ref $used-a-lot) (ref $used-a-lot) (ref $used-a-lot) (ref $used-a-lot) (ref $used-a-lot) (ref $used-a-lot)) (result (ref $used-a-bit) (ref $used-a-bit) (ref $used-a-bit) (ref $used-a-bit)) (unreachable) ) @@ -42,33 +44,25 @@ (module ;; Test that we respect dependencies between groups before considering counts. - ;; CHECK: (rec - ;; CHECK-NEXT: (type $leaf (struct_subtype data)) - ;; CHECK-NEXT: (type $unused (struct_subtype data)) - ;; CHECK-NEXT: ) - - ;; CHECK-NEXT: (rec - ;; CHECK-NEXT: (type $shrub (struct_subtype $leaf)) - ;; CHECK-NEXT: (type $used-a-ton (struct_subtype data)) - ;; CHECK-NEXT: ) - - ;; CHECK-NEXT: (rec - ;; CHECK-NEXT: (type $twig (struct_subtype data)) - ;; CHECK-NEXT: (type $used-a-bit (struct_subtype (field (ref $leaf)) data)) - ;; CHECK-NEXT: ) - - ;; CHECK-NEXT: (rec - ;; CHECK-NEXT: (type $root (struct_subtype data)) - ;; CHECK-NEXT: (type $used-a-lot (struct_subtype $twig)) - ;; CHECK-NEXT: ) (rec + ;; CHECK: (rec + ;; CHECK-NEXT: (type $leaf (struct_subtype data)) (type $leaf (struct_subtype data)) + ;; CHECK: (type $unused (struct_subtype data)) (type $unused (struct_subtype data)) ) (rec + ;; CHECK: (rec + ;; CHECK-NEXT: (type $shrub (struct_subtype $leaf)) + + ;; CHECK: (type $used-a-ton (struct_subtype data)) + + ;; CHECK: (rec + ;; CHECK-NEXT: (type $twig (struct_subtype data)) (type $twig (struct_subtype data)) + ;; CHECK: (type $used-a-bit (struct_subtype (field (ref $leaf)) data)) (type $used-a-bit (struct_subtype (ref $leaf) data)) ) @@ -78,10 +72,23 @@ ) (rec + ;; CHECK: (rec + ;; CHECK-NEXT: (type $root (struct_subtype data)) (type $root (struct_subtype data)) + ;; CHECK: (type $used-a-lot (struct_subtype $twig)) (type $used-a-lot (struct_subtype $twig)) ) + ;; CHECK: (func $use (type $ref|$used-a-lot|_ref|$used-a-lot|_ref|$used-a-lot|_ref|$used-a-lot|_ref|$used-a-lot|_ref|$used-a-lot|_=>_ref|$used-a-bit|_ref|$used-a-bit|_ref|$used-a-bit|) (param $0 (ref $used-a-lot)) (param $1 (ref $used-a-lot)) (param $2 (ref $used-a-lot)) (param $3 (ref $used-a-lot)) (param $4 (ref $used-a-lot)) (param $5 (ref $used-a-lot)) (result (ref $used-a-bit) (ref $used-a-bit) (ref $used-a-bit)) + ;; CHECK-NEXT: (local $6 (ref null $used-a-ton)) + ;; CHECK-NEXT: (local $7 (ref null $used-a-ton)) + ;; CHECK-NEXT: (local $8 (ref null $used-a-ton)) + ;; CHECK-NEXT: (local $9 (ref null $used-a-ton)) + ;; CHECK-NEXT: (local $10 (ref null $used-a-ton)) + ;; CHECK-NEXT: (local $11 (ref null $used-a-ton)) + ;; CHECK-NEXT: (local $12 (ref null $used-a-ton)) + ;; CHECK-NEXT: (unreachable) + ;; CHECK-NEXT: ) (func $use (param (ref $used-a-lot) (ref $used-a-lot) (ref $used-a-lot) (ref $used-a-lot) (ref $used-a-lot) (ref $used-a-lot)) (result (ref $used-a-bit) (ref $used-a-bit) (ref $used-a-bit)) (local (ref null $used-a-ton) (ref null $used-a-ton) (ref null $used-a-ton) (ref null $used-a-ton) (ref null $used-a-ton) (ref null $used-a-ton) (ref null $used-a-ton)) (unreachable) @@ -92,9 +99,13 @@ ;; Test that basic heap type children do not trigger assertions. (rec + ;; CHECK: (type $contains-basic (struct_subtype (field (ref any)) data)) (type $contains-basic (struct_subtype (ref any) data)) ) + ;; CHECK: (func $use (type $ref|$contains-basic|_=>_none) (param $0 (ref $contains-basic)) + ;; CHECK-NEXT: (unreachable) + ;; CHECK-NEXT: ) (func $use (param (ref $contains-basic)) (unreachable) ) |