From ea20225d793b6c743703ea04cd9bb46c07384853 Mon Sep 17 00:00:00 2001 From: Thomas Lively <7121787+tlively@users.noreply.github.com> Date: Fri, 2 Jul 2021 15:23:26 +0000 Subject: Add option to add checks for all items (#3961) Add an --all-items flag to update_lit_checks.py to emit checks for all module items, not just those that match items in the input. Update two tests to use generated input with the new flag. Also, to improve readability, insert an empty line between consecutive checks for different items. --- test/lit/passes/poppify-globals.wast | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) (limited to 'test/lit/passes/poppify-globals.wast') diff --git a/test/lit/passes/poppify-globals.wast b/test/lit/passes/poppify-globals.wast index ccdb025c0..869015cb7 100644 --- a/test/lit/passes/poppify-globals.wast +++ b/test/lit/passes/poppify-globals.wast @@ -1,26 +1,37 @@ +;; 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: (global $foo (mut i32) (i32.const 0)) + ;; CHECK: (type $none_=>_i32_i64_f32 (func (result i32 i64 f32))) + + ;; CHECK: (type $none_=>_none (func)) + + ;; CHECK: (global $foo (mut i32) (i32.const 0)) (global $foo (mut i32) (i32.const 0)) - ;; CHECK: (global $tuple$1 f64 (f64.const 0)) + ;; CHECK: (global $tuple$1 f64 (f64.const 0)) (global $tuple$1 f64 (f64.const 0)) ;; interfering name! - ;; CHECK: (global $tuple$2 (mut f32) (f32.const 2)) - ;; CHECK: (global $tuple$1_0 (mut i64) (i64.const 1)) - ;; CHECK: (global $tuple$0 (mut i32) (global.get $foo)) (global $tuple (mut (i32 i64 f32)) (tuple.make (global.get $foo) (i64.const 1) (f32.const 2)) ) - ;; CHECK: (global $other-tuple$2 f32 (global.get $tuple$2)) - ;; CHECK: (global $other-tuple$1 i64 (global.get $tuple$1_0)) - ;; CHECK: (global $other-tuple$0 i32 (global.get $tuple$0)) (global $other-tuple (i32 i64 f32) (global.get $tuple)) - ;; CHECK: (func $global-get-tuple + ;; CHECK: (global $tuple$2 (mut f32) (f32.const 2)) + + ;; CHECK: (global $tuple$1_0 (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_0)) + + ;; CHECK: (global $other-tuple$0 i32 (global.get $tuple$0)) + + ;; CHECK: (func $global-get-tuple (result i32 i64 f32) ;; CHECK-NEXT: (global.get $tuple$0) ;; CHECK-NEXT: (global.get $tuple$1_0) ;; CHECK-NEXT: (global.get $tuple$2) -- cgit v1.2.3