-
Notifications
You must be signed in to change notification settings - Fork 761
non-integer parameters to or/and intrinsics crash the compiler #7057
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
Comments
pow2clk
added a commit
to pow2clk/DirectXShaderCompiler
that referenced
this issue
Jan 13, 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 microsoft#7057
pow2clk
added a commit
to pow2clk/DirectXShaderCompiler
that referenced
this issue
Jan 21, 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 microsoft#7057
pow2clk
added a commit
to pow2clk/DirectXShaderCompiler
that referenced
this issue
Jan 22, 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 microsoft#7057
pow2clk
added a commit
to pow2clk/DirectXShaderCompiler
that referenced
this issue
Jan 27, 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: microsoft#7057 FIxes: microsoft#6995
pow2clk
added a commit
to pow2clk/DirectXShaderCompiler
that referenced
this issue
Jan 27, 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: microsoft#7057 FIxes: microsoft#6995 (cherry picked from commit 25faa88)
pow2clk
added a commit
that referenced
this issue
Jan 27, 2025
Cherry-pick of #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: #7057 Fixes: #6995 (cherry picked from commit 25faa88)
pow2clk
added a commit
to pow2clk/DirectXShaderCompiler
that referenced
this issue
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: microsoft#7057 FIxes: microsoft#6995 (cherry picked from commit 25faa88)
pow2clk
added a commit
that referenced
this issue
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)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Providing floating point values to and/or intrinsics results in a compiler crash.
Steps to Reproduce
Passing floating values, whether scalars or vectors, from any source to either
or
orand
.https://godbolt.org/z/aa8v4T6sd
Actual Behavior
Results in an internal compiler error.
Environment
The text was updated successfully, but these errors were encountered: