Skip to content

Fix and/or intrinsics with non-int parameters (cp to 1.8.2502) #7099

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

Merged
merged 2 commits into from
Jan 29, 2025

Conversation

pow2clk
Copy link
Member

@pow2clk pow2clk commented Jan 29, 2025

And/or intrinsics were set to allow any parameters, which is consistent with the behavior of the && and || operators they were meant to replace, however this meant that if they were passed floating point values, those values would be applied to the binary and/or operands, which isn't allowed. Instead, they should be converted to booleans to be consistent with the behavior of && and ||. This can be done simply by restricting the parameters to booleans which forces the appropriate conversions. Adds tests for for using bools, ints, and floats in scalars, different sized vectors, and matrices as parameters to or and and.

Fixes: #7057
FIxes: #6995
(cherry picked from commit 25faa88)

And/or intrinsics were set to allow any parameters, which is consistent
with the behavior of the && and || operators they were meant to replace,
however this meant that if they were passed floating point values, those
values would be applied to the binary and/or operands, which isn't
allowed. Instead, they should be converted to booleans to be consistent
with the behavior of && and ||. This can be done simply by restricting
the parameters to booleans which forces the appropriate conversions.
Adds tests for for using bools, ints, and floats in scalars, different
sized vectors, and matrices as parameters to or and and.

Fixes: microsoft#7057
FIxes: microsoft#6995
(cherry picked from commit 25faa88)
@pow2clk pow2clk requested a review from a team as a code owner January 29, 2025 19:17
@pow2clk pow2clk changed the title Fix and/or intrinsics with non-int parameters (#7060) Fix and/or intrinsics with non-int parameters Jan 29, 2025
@pow2clk pow2clk changed the title Fix and/or intrinsics with non-int parameters Fix and/or intrinsics with non-int parameters (cp to 1.8.2502) Jan 29, 2025
@pow2clk pow2clk enabled auto-merge (squash) January 29, 2025 19:19
@pow2clk pow2clk merged commit d6dc036 into microsoft:release-1.8.2502 Jan 29, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants