We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
true
When casting a true bool to a signed integer of any length in a Daphne script it is cast to -1 instead of 1.
-1
1
print(as.si8(true)); // -1 print(as.si32(true)); // -1 print(as.si64(true)); // -1 // print(as.ui64(true)); // 1
The IR immediately after parsing still shows:
%1 = "daphne.constant"() {value = true} : () -> i1 %2 = "daphne.cast"(%1) : (i1) -> si8
whereas after simplifications (parsing_simplified) these have been wrongfully folded to just
parsing_simplified
%2 = "daphne.constant"() {value = -1 : si8} : () -> si8
The text was updated successfully, but these errors were encountered:
[DAPHNE-daphne-eu#680] bug fix for signed integer casts
c594111
- conditional extension by signedness - adds new test cases for ConstantFoldingTest
f93d5be
[DAPHNE-#680] bug fix for signed integer casts
696a2b1
Successfully merging a pull request may close this issue.
When casting a
true
bool to a signed integer of any length in a Daphne script it is cast to-1
instead of1
.The IR immediately after parsing still shows:
whereas after simplifications (
parsing_simplified
) these have been wrongfully folded to justThe text was updated successfully, but these errors were encountered: