Skip to content

Simplify A == B == constant conditionals #6307

@plafosse

Description

@plafosse

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

Metadata

Metadata

Assignees

Labels

Core: HLILIssue involves High Level ILEffort: TrivialIssues require < 1 day of workIL OptimizationIssue involving optimization of representation (not correctness)Impact: MediumIssue is impactful with a bad, or no, workaround

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions