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

Simplify A == B == constant conditionals #6307

Open
plafosse opened this issue Jan 10, 2025 · 0 comments
Open

Simplify A == B == constant conditionals #6307

plafosse opened this issue Jan 10, 2025 · 0 comments
Labels
Core: HLIL Issue involves High Level IL Effort: Trivial Issue should take < 1 day IL Optimization Issue involving optimization of representation (not correctness) Impact: Medium Issue is impactful with a bad, or no, workaround Type: Enhancement Issue is a small enhancement to existing functionality

Comments

@plafosse
Copy link
Member

We currently do not simplify the case of Comparison with the result of a comparison. This is a straightforward optimization:

A cond B == 1 => A cond B
A cond B == 0 => A !cond B
A cond B == !(0|1) => False

@plafosse plafosse added Type: Enhancement Issue is a small enhancement to existing functionality Core: HLIL Issue involves High Level IL IL Optimization Issue involving optimization of representation (not correctness) Impact: Medium Issue is impactful with a bad, or no, workaround Effort: Trivial Issue should take < 1 day labels Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core: HLIL Issue involves High Level IL Effort: Trivial Issue should take < 1 day IL Optimization Issue involving optimization of representation (not correctness) Impact: Medium Issue is impactful with a bad, or no, workaround Type: Enhancement Issue is a small enhancement to existing functionality
Projects
None yet
Development

No branches or pull requests

1 participant