Fix __ordered and _unordered floating point functions for C++ target.
Fixes include adding "_float" and "_double" suffixes as appropriate as well as providing a number of missing implementations. This fixes a number of failures in the half* tests.
This commit is contained in:
@@ -819,7 +819,7 @@ CMP_OP(__vec64_f, float, float, __less_equal, <=)
|
||||
CMP_OP(__vec64_f, float, float, __greater_than, >)
|
||||
CMP_OP(__vec64_f, float, float, __greater_equal, >=)
|
||||
|
||||
static FORCEINLINE __vec64_i1 __ordered(__vec64_f a, __vec64_f b) {
|
||||
static FORCEINLINE __vec64_i1 __ordered_float(__vec64_f a, __vec64_f b) {
|
||||
__vec64_i1 ret;
|
||||
ret.v = 0;
|
||||
for (int i = 0; i < 64; ++i)
|
||||
@@ -827,6 +827,14 @@ static FORCEINLINE __vec64_i1 __ordered(__vec64_f a, __vec64_f b) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
static FORCEINLINE __vec64_i1 __unordered_float(__vec64_f a, __vec64_f b) {
|
||||
__vec64_i1 ret;
|
||||
ret.v = 0;
|
||||
for (int i = 0; i < 64; ++i)
|
||||
ret.v |= ((a.v[i] != a.v[i]) || (b.v[i] != b.v[i])) ? (1ull << i) : 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if 0
|
||||
case Instruction::FRem: intrinsic = "__frem"; break;
|
||||
#endif
|
||||
@@ -971,7 +979,7 @@ CMP_OP(__vec64_d, double, double, __less_equal, <=)
|
||||
CMP_OP(__vec64_d, double, double, __greater_than, >)
|
||||
CMP_OP(__vec64_d, double, double, __greater_equal, >=)
|
||||
|
||||
static FORCEINLINE __vec64_i1 __ordered(__vec64_d a, __vec64_d b) {
|
||||
static FORCEINLINE __vec64_i1 __ordered_double(__vec64_d a, __vec64_d b) {
|
||||
__vec64_i1 ret;
|
||||
ret.v = 0;
|
||||
for (int i = 0; i < 64; ++i)
|
||||
@@ -979,6 +987,14 @@ static FORCEINLINE __vec64_i1 __ordered(__vec64_d a, __vec64_d b) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
static FORCEINLINE __vec64_i1 __unordered_double(__vec64_d a, __vec64_d b) {
|
||||
__vec64_i1 ret;
|
||||
ret.v = 0;
|
||||
for (int i = 0; i < 64; ++i)
|
||||
ret.v |= ((a.v[i] != a.v[i]) || (b.v[i] != b.v[i])) ? (1ull << i) : 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if 0
|
||||
case Instruction::FRem: intrinsic = "__frem"; break;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user