diff options
author | Alon Zakai <azakai@google.com> | 2022-11-14 14:55:53 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-14 14:55:53 -0800 |
commit | a221b01b89ced3aa6335723e68bf17ea97377a08 (patch) | |
tree | f1fab7c0b49075ff557b3a8ecc123ae495f6c417 /test/lit/passes/inlining-optimizing_optimize-level=3.wast | |
parent | 7df80050b6e5f3aa449da95b28a1d3e7eb778cb3 (diff) | |
download | binaryen-a221b01b89ced3aa6335723e68bf17ea97377a08.tar.gz binaryen-a221b01b89ced3aa6335723e68bf17ea97377a08.tar.bz2 binaryen-a221b01b89ced3aa6335723e68bf17ea97377a08.zip |
Fix a trivial CodePushing bug with looking at the wrong index (#5252)
Pretty simple logic bug, but it ended up causing us to not optimize sometimes.
Sadly the original tests happened to not have anything that depended on the
index in isolation.
Fix + add comprehensive tests for using that index properly. Also test the
call.without.effects intrinsic, which is orthoginal to this, but also worth testing
as it is a big use case here.
Diffstat (limited to 'test/lit/passes/inlining-optimizing_optimize-level=3.wast')
-rw-r--r-- | test/lit/passes/inlining-optimizing_optimize-level=3.wast | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/lit/passes/inlining-optimizing_optimize-level=3.wast b/test/lit/passes/inlining-optimizing_optimize-level=3.wast index cd51a3121..feaa3171a 100644 --- a/test/lit/passes/inlining-optimizing_optimize-level=3.wast +++ b/test/lit/passes/inlining-optimizing_optimize-level=3.wast @@ -7917,16 +7917,6 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block $do-once99 - ;; CHECK-NEXT: (local.set $20 - ;; CHECK-NEXT: (select - ;; CHECK-NEXT: (local.get $11) - ;; CHECK-NEXT: (i32.add - ;; CHECK-NEXT: (local.get $12) - ;; CHECK-NEXT: (i32.const 4) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.get $26) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) ;; CHECK-NEXT: (call $_pad ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: (i32.const 48) @@ -7937,6 +7927,16 @@ ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block (result i32) + ;; CHECK-NEXT: (local.set $20 + ;; CHECK-NEXT: (select + ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (i32.add + ;; CHECK-NEXT: (local.get $12) + ;; CHECK-NEXT: (i32.const 4) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (local.get $26) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $18 ;; CHECK-NEXT: (i32.eqz ;; CHECK-NEXT: (local.get $18) |