Commit ef1472a
Greg Roth
Fix and/or intrinsics with non-int parameters (cp to 1.8.2502) (microsoft#7091)
Cherry-pick of microsoft#7060 to release-1.8.2502
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)1 parent 1fdebc4 commit ef1472a
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
0 commit comments