Skip to content
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

ISLE: rewrite loose inequalities to strict inequalities and strict inequalities to equalities #6130

Conversation

Kmeakin
Copy link
Contributor

@Kmeakin Kmeakin commented Mar 31, 2023

Rewrites loose inequalities against constants to equivalent strict inequalities, and strict inequalities to equalities when possible. By itself not more efficient, but should expose more CSE opportunities (eg ule x, 2 && ult x, 1)

@Kmeakin Kmeakin requested a review from a team as a code owner March 31, 2023 15:22
@Kmeakin Kmeakin requested review from cfallin and removed request for a team March 31, 2023 15:22
@github-actions github-actions bot added the cranelift Issues related to the Cranelift code generator label Mar 31, 2023
@Kmeakin Kmeakin changed the title ISLE: rewrite loose inequalities to strict inequalities ISLE: rewrite loose inequalities to strict inequalities and strict inequalities to equalities Mar 31, 2023
Copy link
Member

@cfallin cfallin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks reasonable to me (once rebased after #6120 lands) -- thanks!

A suggestion below to maybe make the +1/-1 cases a little nicer, but fine without too if you prefer this version.

cranelift/codegen/src/opts/icmp.isle Show resolved Hide resolved
@Kmeakin Kmeakin force-pushed the icmp-loose-inequalities-to-strict-inequalities branch 2 times, most recently from 20ac67e to 9e31ec1 Compare April 1, 2023 16:33
@Kmeakin Kmeakin force-pushed the icmp-loose-inequalities-to-strict-inequalities branch from 9e31ec1 to 0507a1d Compare April 1, 2023 16:35
@Kmeakin Kmeakin requested a review from cfallin April 1, 2023 16:35
@cfallin cfallin added this pull request to the merge queue Apr 4, 2023
Merged via the queue into bytecodealliance:main with commit 57e42d0 Apr 4, 2023
cfallin added a commit to cfallin/wasmtime that referenced this pull request Apr 10, 2023
cfallin added a commit to cfallin/wasmtime that referenced this pull request Apr 10, 2023
cfallin added a commit that referenced this pull request Apr 10, 2023
…trict inequalities to equalities (#6130)" (#6193)

This reverts commit 57e42d0.

Fixes #6185.
cfallin added a commit that referenced this pull request Apr 10, 2023
…trict inequalities to equalities (#6130)" (#6194)

This reverts commit 57e42d0.

Fixes #6185.
@Kmeakin Kmeakin deleted the icmp-loose-inequalities-to-strict-inequalities branch April 11, 2023 21:06
brendandburns pushed a commit to brendandburns/wasmtime that referenced this pull request Apr 13, 2023
Kmeakin added a commit to Kmeakin/wasmtime that referenced this pull request Jul 27, 2024
Add a regression test for issue bytecodealliance#6185. PR bytecodealliance#6130 will be re-applied in
next commit.

Signed-off-by: Karl Meakin <karl.meakin@arm.com>
Kmeakin added a commit to Kmeakin/wasmtime that referenced this pull request Jul 27, 2024
Add a regression test for issue bytecodealliance#6185. PR bytecodealliance#6130 will be re-applied in
next commit.

Signed-off-by: Karl Meakin <karl.meakin@arm.com>
Kmeakin added a commit to Kmeakin/wasmtime that referenced this pull request Jul 27, 2024
Add a regression test for issue bytecodealliance#6185. PR bytecodealliance#6130 will be re-applied in
next commit.

Copyright (c) 2024, Arm Limited.

Signed-off-by: Karl Meakin <karl.meakin@arm.com>
Kmeakin added a commit to Kmeakin/wasmtime that referenced this pull request Jul 29, 2024
Add a regression test for issue bytecodealliance#6185. PR bytecodealliance#6130 will be re-applied in
next commit.

Copyright (c) 2024, Arm Limited.

Signed-off-by: Karl Meakin <karl.meakin@arm.com>
Kmeakin added a commit to Kmeakin/wasmtime that referenced this pull request Aug 5, 2024
Add a regression test for issue bytecodealliance#6185. PR bytecodealliance#6130 will be re-applied in
next commit.

Copyright (c) 2024, Arm Limited.

Signed-off-by: Karl Meakin <karl.meakin@arm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift Issues related to the Cranelift code generator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants