Use OpFUnordNotEqual for floating-point !=
The normal IEEE not equal operation tests whether operands are unordered or not equal (so comparison with a NaN returns true). This corresponds to the SPIR-V OpFUnordNotEqual, so change to using that.
This commit is contained in:
parent
adacba3ee9
commit
65ce566cbc
2 changed files with 5 additions and 5 deletions
|
|
@ -2166,7 +2166,7 @@ Id Builder::createCompositeCompare(Decoration precision, Id value1, Id value2, b
|
|||
Op op;
|
||||
switch (getMostBasicTypeClass(valueType)) {
|
||||
case OpTypeFloat:
|
||||
op = equal ? OpFOrdEqual : OpFOrdNotEqual;
|
||||
op = equal ? OpFOrdEqual : OpFUnordNotEqual;
|
||||
break;
|
||||
case OpTypeInt:
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue