summaryrefslogtreecommitdiff
path: root/test/lit/passes/inlining-optimizing_optimize-level=3.wast
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2023-08-08 11:10:33 -0700
committerGitHub <noreply@github.com>2023-08-08 11:10:33 -0700
commitf1e92f99867b646aebd8a4f9b35c4972301e6469 (patch)
treeaaac08ab6c8b824c3e86086fae92a75ce89360f7 /test/lit/passes/inlining-optimizing_optimize-level=3.wast
parentd26d2146c3f58116d4ae7751e3bbfffeb1455412 (diff)
downloadbinaryen-f1e92f99867b646aebd8a4f9b35c4972301e6469.tar.gz
binaryen-f1e92f99867b646aebd8a4f9b35c4972301e6469.tar.bz2
binaryen-f1e92f99867b646aebd8a4f9b35c4972301e6469.zip
LinearExecutionTraversal: Add an option to connect adjacent code, use in SimplifyLocals (#5860)
This addresses most of the minor regression from the correctness fix in #5857. That PR makes us consider calls as branching, but in some cases it is ok to ignore that branching (see the comment in the code here), which this PR allows as an option. This undoes one test change from that PR, showing it undoes the regression for SimplifyLocals. More tests are added to cover this specifically as well.
Diffstat (limited to 'test/lit/passes/inlining-optimizing_optimize-level=3.wast')
-rw-r--r--test/lit/passes/inlining-optimizing_optimize-level=3.wast20
1 files changed, 13 insertions, 7 deletions
diff --git a/test/lit/passes/inlining-optimizing_optimize-level=3.wast b/test/lit/passes/inlining-optimizing_optimize-level=3.wast
index 29ee11b46..c6c4f389c 100644
--- a/test/lit/passes/inlining-optimizing_optimize-level=3.wast
+++ b/test/lit/passes/inlining-optimizing_optimize-level=3.wast
@@ -6818,7 +6818,7 @@
;; CHECK-NEXT: (i32.mul
;; CHECK-NEXT: (i32.shr_s
;; CHECK-NEXT: (i32.sub
- ;; CHECK-NEXT: (local.get $20)
+ ;; CHECK-NEXT: (local.get $8)
;; CHECK-NEXT: (local.get $5)
;; CHECK-NEXT: )
;; CHECK-NEXT: (i32.const 2)
@@ -8423,9 +8423,7 @@
;; CHECK-NEXT: (i32.and
;; CHECK-NEXT: (local.tee $9
;; CHECK-NEXT: (i32.ne
- ;; CHECK-NEXT: (local.tee $7
- ;; CHECK-NEXT: (local.get $6)
- ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local.get $6)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -8438,6 +8436,9 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (local.set $7
+ ;; CHECK-NEXT: (local.get $6)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: (local.set $8
;; CHECK-NEXT: (local.get $5)
;; CHECK-NEXT: )
@@ -8478,8 +8479,13 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.set $8
- ;; CHECK-NEXT: (local.get $5)
+ ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (local.set $7
+ ;; CHECK-NEXT: (local.get $6)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local.set $8
+ ;; CHECK-NEXT: (local.get $5)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (br_if $__rjti$20
@@ -8502,7 +8508,7 @@
;; CHECK-NEXT: (block $__rjti$07
;; CHECK-NEXT: (br_if $__rjti$07
;; CHECK-NEXT: (i32.le_u
- ;; CHECK-NEXT: (local.get $9)
+ ;; CHECK-NEXT: (local.get $7)
;; CHECK-NEXT: (i32.const 3)
;; CHECK-NEXT: )
;; CHECK-NEXT: )