Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tlively committed Mar 5, 2024
1 parent da7341d commit caa5bb1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 67 deletions.
36 changes: 4 additions & 32 deletions test/lit/multivalue.wast
Original file line number Diff line number Diff line change
Expand Up @@ -356,24 +356,10 @@

;; Test multivalue control structures
;; CHECK: (func $mv-return (type $0) (result i32 i64)
;; CHECK-NEXT: (local $scratch i32)
;; CHECK-NEXT: (local $1 i64)
;; CHECK-NEXT: (local $2 i64)
;; CHECK-NEXT: (local $3 i32)
;; CHECK-NEXT: (return
;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (local.tee $scratch
;; CHECK-NEXT: (block (result i32)
;; CHECK-NEXT: (local.set $3
;; CHECK-NEXT: (i32.const 42)
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.set $1
;; CHECK-NEXT: (i64.const 42)
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.get $3)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.get $1)
;; CHECK-NEXT: (i32.const 42)
;; CHECK-NEXT: (i64.const 42)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
Expand All @@ -387,24 +373,10 @@
)

;; CHECK: (func $mv-return-in-block (type $0) (result i32 i64)
;; CHECK-NEXT: (local $scratch i32)
;; CHECK-NEXT: (local $1 i64)
;; CHECK-NEXT: (local $2 i64)
;; CHECK-NEXT: (local $3 i32)
;; CHECK-NEXT: (return
;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (local.tee $scratch
;; CHECK-NEXT: (block (result i32)
;; CHECK-NEXT: (local.set $3
;; CHECK-NEXT: (i32.const 42)
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.set $1
;; CHECK-NEXT: (i64.const 42)
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.get $3)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.get $1)
;; CHECK-NEXT: (i32.const 42)
;; CHECK-NEXT: (i64.const 42)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
Expand Down
23 changes: 0 additions & 23 deletions test/lit/passes/poppify.wast
Original file line number Diff line number Diff line change
Expand Up @@ -500,31 +500,8 @@
)

;; CHECK: (func $return-tuple (type $1) (result i32 i64)
;; CHECK-NEXT: (local $scratch (tuple i32 i64))
;; CHECK-NEXT: (local $1 i32)
;; CHECK-NEXT: (local $2 i64)
;; CHECK-NEXT: (local $3 i64)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i64.const 1)
;; CHECK-NEXT: (local.set $2
;; CHECK-NEXT: (pop i64)
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.tee $1
;; CHECK-NEXT: (pop i32)
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.get $2)
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (pop i64)
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.get $1)
;; CHECK-NEXT: (local.get $2)
;; CHECK-NEXT: (local.set $3
;; CHECK-NEXT: (pop i64)
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (pop i32)
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.get $3)
;; CHECK-NEXT: (return
;; CHECK-NEXT: (pop (tuple i32 i64))
;; CHECK-NEXT: )
Expand Down
14 changes: 2 additions & 12 deletions test/lit/passes/unsubtyping.wast
Original file line number Diff line number Diff line change
Expand Up @@ -712,20 +712,10 @@
;; CHECK: (type $4 (func (result (ref $super1) (ref $super2))))

;; CHECK: (func $return-many (type $4) (result (ref $super1) (ref $super2))
;; CHECK-NEXT: (local $scratch (tuple (ref $sub1) (ref $sub2)))
;; CHECK-NEXT: (return
;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (tuple.extract 2 0
;; CHECK-NEXT: (local.tee $scratch
;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (struct.new_default $sub1)
;; CHECK-NEXT: (struct.new_default $sub2)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (tuple.extract 2 1
;; CHECK-NEXT: (local.get $scratch)
;; CHECK-NEXT: )
;; CHECK-NEXT: (struct.new_default $sub1)
;; CHECK-NEXT: (struct.new_default $sub2)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
Expand Down

0 comments on commit caa5bb1

Please sign in to comment.