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

[LLVM][FIX] Float generation fix in LLVM helper visitor #865

Merged
merged 3 commits into from
May 12, 2022

Conversation

georgemitenkov
Copy link
Collaborator

@georgemitenkov georgemitenkov commented May 11, 2022

This PR fixes how single-precision floats are handles in LLVM
helper visitor. Before, DOUBLE was always created which was
not consistent with LLVM visitor (that lowered DOUBLE to 32-
or 64-bit types) and instance struct initialisation in testing (which
assumed that for DOUBLE it always holds that
sizeof(double) = 8).

Now, there is a clear separation between FLOAT and DOUBLE
values in helper visitor.

Note: this bug was not discovered before since execution tests were
only considering doubles. So, one of the tests was changed to use
floats.

@georgemitenkov georgemitenkov added the bug Something isn't working label May 11, 2022
@bbpbuildbot
Copy link
Collaborator

Logfiles from GitLab pipeline #54237 (:white_check_mark:) have been uploaded here!

Status and direct links:

Copy link
Contributor

@iomaganaris iomaganaris left a comment

Choose a reason for hiding this comment

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

LGTM 👍
Just a small suggestion regarding one of the tests

test/unit/codegen/codegen_llvm_instance_struct.cpp Outdated Show resolved Hide resolved
@bbpbuildbot
Copy link
Collaborator

Logfiles from GitLab pipeline #54405 (:white_check_mark:) have been uploaded here!

Status and direct links:

@bbpbuildbot
Copy link
Collaborator

Logfiles from GitLab pipeline #54550 (:white_check_mark:) have been uploaded here!

Status and direct links:

@iomaganaris iomaganaris merged commit 6eaf4d1 into llvm May 12, 2022
@iomaganaris iomaganaris deleted the georgemitenkov/float-fix branch May 12, 2022 15:55
iomaganaris pushed a commit that referenced this pull request Sep 15, 2022
* Fixed float AST in helper
* Fixed InstanceStruct test to generate struct with doubles
iomaganaris pushed a commit that referenced this pull request Sep 15, 2022
* Fixed float AST in helper
* Fixed InstanceStruct test to generate struct with doubles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants