;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. ;; TODO: enable validation ;; RUN: wasm-opt %s --poppify --no-validation -all -S -o - | filecheck %s (module ;; CHECK: (type $0 (func (result i32 i64 f32))) ;; CHECK: (type $1 (func)) ;; CHECK: (global $foo (mut i32) (i32.const 0)) (global $foo (mut i32) (i32.const 0)) ;; CHECK: (global $tuple$1 f64 (f64.const 0)) (global $tuple$1 f64 (f64.const 0)) ;; interfering name! (global $tuple (mut (tuple i32 i64 f32)) (tuple.make 3 (global.get $foo) (i64.const 1) (f32.const 2)) ) (global $other-tuple (tuple i32 i64 f32) (global.get $tuple)) ;; CHECK: (global $tuple$2 (mut f32) (f32.const 2)) ;; CHECK: (global $tuple$1_3 (mut i64) (i64.const 1)) ;; CHECK: (global $tuple$0 (mut i32) (global.get $foo)) ;; CHECK: (global $other-tuple$2 f32 (global.get $tuple$2)) ;; CHECK: (global $other-tuple$1 i64 (global.get $tuple$1_4)) ;; CHECK: (global $other-tuple$0 i32 (global.get $tuple$0)) ;; CHECK: (func $global-get-tuple (type $0) (result i32 i64 f32) ;; CHECK-NEXT: (global.get $tuple$0) ;; CHECK-NEXT: (global.get $tuple$1_4) ;; CHECK-NEXT: (global.get $tuple$2) ;; CHECK-NEXT: ) (func $global-get-tuple (result i32 i64 f32) (global.get $tuple) ) ;; CHECK: (func $global-set-tuple (type $1) ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: (i64.const 1) ;; CHECK-NEXT: (f32.const 2) ;; CHECK-NEXT: (global.set $tuple$2 ;; CHECK-NEXT: (pop f32) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (global.set $tuple$1_4 ;; CHECK-NEXT: (pop i64) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (global.set $tuple$0 ;; CHECK-NEXT: (pop i32) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) (func $global-set-tuple (global.set $tuple (tuple.make 3 (i32.const 0) (i64.const 1) (f32.const 2) ) ) ) )