[Cranelift] add simplification rules#12799
Open
myunbin wants to merge 13 commits intobytecodealliance:mainfrom
Open
[Cranelift] add simplification rules#12799myunbin wants to merge 13 commits intobytecodealliance:mainfrom
myunbin wants to merge 13 commits intobytecodealliance:mainfrom
Conversation
Subscribe to Label ActionDetailsThis issue or pull request has been labeled: "cranelift", "isle"Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
f385205 to
73dc333
Compare
Contributor
Author
|
I’m trying to identify the reason for the CI failure, but since it’s difficult to check on local environment, I will check various scenarios. I would appreciate it if you could ignore this PR until it is completed. |
fec2a5b to
73dc333
Compare
73dc333 to
c0e94af
Compare
prtest:linux-x64
prtest:linux-x64
prtest:linux-x64
prtest:linux-x64
prtest:linux-x64
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds several simplification rules:
arithmetic.isle((x + y) - (x + z)) --> (y - z)((x - z) - (y - z)) --> (x - y)((x - y) - (x - z)) --> (z - y)min(x, y) + max(x, y) --> x + y((x - y) + (y + z)) --> (x + z)(x - (x + y)) --> -y(x + (y + (z - x))) --> (y + z)(x + y) == (y + x) --> true(x - y) != x --> y != 0bitops.isle((x & ~y) - (x & y)) --> ((x ^ y) - y)(x & ~y) | (~x & y) --> (x ^ y)(x & ~y) | (x ^ y) --> (x ^ y)(x & ~y) ^ ~x --> ~(x & y)(~x & y) ^ x --> x | y(x | y) & ~(x ^ y) --> x & yx | ~(x ^ y) --> x | ~yx | ((~x) ^ y) --> x | ~yx & ~(x ^ y) --> x & yx & ((~x) ^ y) --> x & y(x | y) | (x ^ y) --> (x | y)(x ^ y) & (x ^ (y ^ z)) --> (x ^ y) & ~z(~x & y) ^ z --> (x & y) ^ (z ^ y)~x - ~y --> y - x(~x & y) | ~(x | y) --> ~x(~x | y) & ~(x & y) --> ~x(x & y) | ~(x | y) --> ~(x ^ y)(~x | y) ^ (x ^ y) --> x | ~ycc @bongjunj