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

[CIR][CIRGen][Bugfix] Emit valid type for evaluated const #456

Merged
merged 2 commits into from
Feb 8, 2024

Conversation

YazZz1k
Copy link
Contributor

@YazZz1k YazZz1k commented Feb 8, 2024

This PR fixes the issue connected with folding a simple boolean expresion pattern (f.e. 0 && RHS = 0).
The problem is that the scalar expression emitter always creates a cir.bool attribute as a result of expression. But in some cases the result expression should be a cir.int attr.

Copy link
Member

@bcardosolopes bcardosolopes left a comment

Choose a reason for hiding this comment

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

Awesome cleanup and fixes! LGTM

@bcardosolopes bcardosolopes merged commit 5c2afc3 into llvm:main Feb 8, 2024
6 checks passed
lanza pushed a commit that referenced this pull request Mar 23, 2024
This PR fixes the issue connected with folding a simple boolean
expresion pattern (f.e. `0 && RHS = 0`).
The problem is that the scalar expression emitter always creates a
`cir.bool` attribute as a result of expression. But in some cases the
result expression should be a `cir.int` attr.
eZWALT pushed a commit to eZWALT/clangir that referenced this pull request Mar 24, 2024
This PR fixes the issue connected with folding a simple boolean
expresion pattern (f.e. `0 && RHS = 0`).
The problem is that the scalar expression emitter always creates a
`cir.bool` attribute as a result of expression. But in some cases the
result expression should be a `cir.int` attr.
lanza pushed a commit that referenced this pull request Apr 29, 2024
This PR fixes the issue connected with folding a simple boolean
expresion pattern (f.e. `0 && RHS = 0`).
The problem is that the scalar expression emitter always creates a
`cir.bool` attribute as a result of expression. But in some cases the
result expression should be a `cir.int` attr.
lanza pushed a commit that referenced this pull request Apr 29, 2024
This PR fixes the issue connected with folding a simple boolean
expresion pattern (f.e. `0 && RHS = 0`).
The problem is that the scalar expression emitter always creates a
`cir.bool` attribute as a result of expression. But in some cases the
result expression should be a `cir.int` attr.
eZWALT pushed a commit to eZWALT/clangir that referenced this pull request Apr 29, 2024
This PR fixes the issue connected with folding a simple boolean
expresion pattern (f.e. `0 && RHS = 0`).
The problem is that the scalar expression emitter always creates a
`cir.bool` attribute as a result of expression. But in some cases the
result expression should be a `cir.int` attr.
lanza pushed a commit that referenced this pull request Apr 29, 2024
This PR fixes the issue connected with folding a simple boolean
expresion pattern (f.e. `0 && RHS = 0`).
The problem is that the scalar expression emitter always creates a
`cir.bool` attribute as a result of expression. But in some cases the
result expression should be a `cir.int` attr.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants