diff options
author | Alon Zakai <azakai@google.com> | 2021-10-19 09:07:40 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-19 09:07:40 -0700 |
commit | c19ff59c71824b34fa312aac9ad979e2198d7d36 (patch) | |
tree | c0739ad5f1b93a2e497c38f493135fd483e478dc /test/lit/passes/inlining-optimizing_optimize-level=3.wast | |
parent | be02d3f0f2689475f31c4523010eed58f39d27cb (diff) | |
download | binaryen-c19ff59c71824b34fa312aac9ad979e2198d7d36.tar.gz binaryen-c19ff59c71824b34fa312aac9ad979e2198d7d36.tar.bz2 binaryen-c19ff59c71824b34fa312aac9ad979e2198d7d36.zip |
MergeBlocks: optimize If conditions (#4260)
Code in the If condition can be moved out to before the if.
Existing test updates are 99% whitespace.
Diffstat (limited to 'test/lit/passes/inlining-optimizing_optimize-level=3.wast')
-rw-r--r-- | test/lit/passes/inlining-optimizing_optimize-level=3.wast | 108 |
1 files changed, 53 insertions, 55 deletions
diff --git a/test/lit/passes/inlining-optimizing_optimize-level=3.wast b/test/lit/passes/inlining-optimizing_optimize-level=3.wast index 4a4f21f94..1ae11b22a 100644 --- a/test/lit/passes/inlining-optimizing_optimize-level=3.wast +++ b/test/lit/passes/inlining-optimizing_optimize-level=3.wast @@ -2584,79 +2584,77 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $3 + ;; CHECK-NEXT: (i32.load8_s + ;; CHECK-NEXT: (local.tee $4 + ;; CHECK-NEXT: (i32.add + ;; CHECK-NEXT: (local.get $2) + ;; CHECK-NEXT: (i32.const 74) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (i32.store8 + ;; CHECK-NEXT: (local.get $4) + ;; CHECK-NEXT: (i32.or + ;; CHECK-NEXT: (i32.add + ;; CHECK-NEXT: (local.get $3) + ;; CHECK-NEXT: (i32.const 255) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (local.get $3) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (local.set $3 ;; CHECK-NEXT: (if (result i32) - ;; CHECK-NEXT: (block (result i32) - ;; CHECK-NEXT: (local.set $3 - ;; CHECK-NEXT: (i32.load8_s - ;; CHECK-NEXT: (local.tee $4 - ;; CHECK-NEXT: (i32.add - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: (i32.const 74) - ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (if (result i32) + ;; CHECK-NEXT: (i32.and + ;; CHECK-NEXT: (local.tee $3 + ;; CHECK-NEXT: (i32.load + ;; CHECK-NEXT: (local.get $2) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (i32.const 8) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (i32.store8 - ;; CHECK-NEXT: (local.get $4) - ;; CHECK-NEXT: (i32.or - ;; CHECK-NEXT: (i32.add + ;; CHECK-NEXT: (block (result i32) + ;; CHECK-NEXT: (i32.store + ;; CHECK-NEXT: (local.get $2) + ;; CHECK-NEXT: (i32.or ;; CHECK-NEXT: (local.get $3) - ;; CHECK-NEXT: (i32.const 255) + ;; CHECK-NEXT: (i32.const 32) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.get $3) ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (i32.const -1) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (if (result i32) - ;; CHECK-NEXT: (i32.and + ;; CHECK-NEXT: (block (result i32) + ;; CHECK-NEXT: (i32.store offset=8 + ;; CHECK-NEXT: (local.get $2) + ;; CHECK-NEXT: (i32.const 0) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (i32.store offset=4 + ;; CHECK-NEXT: (local.get $2) + ;; CHECK-NEXT: (i32.const 0) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (i32.store offset=28 + ;; CHECK-NEXT: (local.get $2) ;; CHECK-NEXT: (local.tee $3 - ;; CHECK-NEXT: (i32.load + ;; CHECK-NEXT: (i32.load offset=44 ;; CHECK-NEXT: (local.get $2) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (i32.const 8) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (block (result i32) - ;; CHECK-NEXT: (i32.store - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: (i32.or - ;; CHECK-NEXT: (local.get $3) - ;; CHECK-NEXT: (i32.const 32) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (i32.const -1) + ;; CHECK-NEXT: (i32.store offset=20 + ;; CHECK-NEXT: (local.get $2) + ;; CHECK-NEXT: (local.get $3) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (block (result i32) - ;; CHECK-NEXT: (i32.store offset=8 - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: (i32.const 0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (i32.store offset=4 - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: (i32.const 0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (i32.store offset=28 - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: (local.tee $3 - ;; CHECK-NEXT: (i32.load offset=44 - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (i32.store offset=20 - ;; CHECK-NEXT: (local.get $2) + ;; CHECK-NEXT: (i32.store offset=16 + ;; CHECK-NEXT: (local.get $2) + ;; CHECK-NEXT: (i32.add ;; CHECK-NEXT: (local.get $3) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (i32.store offset=16 - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: (i32.add - ;; CHECK-NEXT: (local.get $3) - ;; CHECK-NEXT: (i32.load offset=48 - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (i32.load offset=48 + ;; CHECK-NEXT: (local.get $2) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 0) |