[Cranelift] add simplification rules by myunbin · Pull Request #12799 · bytecodealliance/wasmtime
Navigation Menu
- Notifications You must be signed in to change notification settings
- Fork 1.7k
Conversation
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 != 0
bitops.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 | ~y
cc @bongjunj
Subscribe to Label Action
Details
This issue or pull request has been labeled: "cranelift", "isle"Thus the following users have been cc'd because of the following labels:
- cfallin: isle
- fitzgen: isle
To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.
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.
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