Skip to content

OptimizeInstruction: Optimize any boolean & (No overlap with boolean's LSB) ==> 0 #7505

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 31 commits into from
May 23, 2025
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
b67c4ac
opt for #7481
xuruiyang2002 Apr 16, 2025
340fd1b
tests
xuruiyang2002 Apr 16, 2025
6aab029
refactor to be generalized
xuruiyang2002 Apr 19, 2025
11992ac
update test due to refactoring
xuruiyang2002 Apr 19, 2025
bfdc24c
No need for special-cased 0
xuruiyang2002 Apr 24, 2025
27ac17f
Avoid redundant replaceCurrent
xuruiyang2002 Apr 24, 2025
2f2dbfb
And is commutative
xuruiyang2002 Apr 24, 2025
a8216a0
Update test
xuruiyang2002 Apr 24, 2025
2bbd847
Update test
xuruiyang2002 Apr 24, 2025
dad3fd5
Update test
xuruiyang2002 Apr 24, 2025
51196f8
Deal with cornor case
xuruiyang2002 Apr 24, 2025
131a423
Add cornor case
xuruiyang2002 Apr 24, 2025
0f09450
Refactor
xuruiyang2002 Apr 24, 2025
37653fe
Update src/passes/OptimizeInstructions.cpp
xuruiyang2002 Apr 29, 2025
0d8c6ad
Avoid redundant code
xuruiyang2002 May 1, 2025
f6de81a
Update test
xuruiyang2002 May 1, 2025
3f900fe
Adjust comments
xuruiyang2002 May 1, 2025
4dfe6ee
Adjust comments
xuruiyang2002 May 1, 2025
e5bffdf
Update src/passes/OptimizeInstructions.cpp
xuruiyang2002 May 2, 2025
4cc33e4
Update src/passes/OptimizeInstructions.cpp
xuruiyang2002 May 2, 2025
fb14118
Update src/passes/OptimizeInstructions.cpp
xuruiyang2002 May 2, 2025
27608e9
Update test
xuruiyang2002 May 2, 2025
4ae987c
Concrete type
xuruiyang2002 May 16, 2025
4eadb01
Update
xuruiyang2002 May 16, 2025
7b7a420
Use isNumber instead of isConcrete
xuruiyang2002 May 16, 2025
a612db0
Simplify tests
xuruiyang2002 May 23, 2025
8f663bb
Update test/lit/passes/optimize-instructions-mvp.wast
xuruiyang2002 May 23, 2025
b57c369
Update test/lit/passes/optimize-instructions-mvp.wast
xuruiyang2002 May 23, 2025
d1c0cf6
Update test/lit/passes/optimize-instructions-mvp.wast
xuruiyang2002 May 23, 2025
a3f26d9
Update test/lit/passes/optimize-instructions-mvp.wast
xuruiyang2002 May 23, 2025
440b963
Update test
xuruiyang2002 May 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
tests
  • Loading branch information
xuruiyang2002 committed Apr 16, 2025
commit 340fd1b579ed9db4474a3204e453f34c6b696c61
12 changes: 2 additions & 10 deletions test/lit/passes/optimize-instructions-mvp.wast
Original file line number Diff line number Diff line change
Expand Up @@ -1442,10 +1442,7 @@
)
;; CHECK: (func $canonicalize-consts-vars (param $x i32) (param $y i32)
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (i32.and
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (i32.and
Expand Down Expand Up @@ -7018,12 +7015,7 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (i32.and
;; CHECK-NEXT: (i32.eqz
;; CHECK-NEXT: (local.get $x)
;; CHECK-NEXT: )
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (i32.eqz
Expand Down
Loading