[CPU] Saturating VectorSub: fix typo in last commit
This commit is contained in:
parent
f14f44e729
commit
2b411f4c8b
|
@ -1351,7 +1351,7 @@ void Value::VectorSub(Value* other, TypeName type, bool is_unsigned,
|
||||||
result &= -int8_t(result <= src1);
|
result &= -int8_t(result <= src1);
|
||||||
} else {
|
} else {
|
||||||
uint8_t overflowed = (src1 >> 7) + INT8_MAX;
|
uint8_t overflowed = (src1 >> 7) + INT8_MAX;
|
||||||
if (int8_t((overflowed ^ src2) & (overflowed ^ result)) >= 0) {
|
if (int8_t((overflowed ^ src2) & (overflowed ^ result)) < 0) {
|
||||||
result = overflowed;
|
result = overflowed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1379,7 +1379,7 @@ void Value::VectorSub(Value* other, TypeName type, bool is_unsigned,
|
||||||
result &= -int16_t(result <= src1);
|
result &= -int16_t(result <= src1);
|
||||||
} else {
|
} else {
|
||||||
uint16_t overflowed = (src1 >> 15) + INT16_MAX;
|
uint16_t overflowed = (src1 >> 15) + INT16_MAX;
|
||||||
if (int16_t((overflowed ^ src2) & (overflowed ^ result)) >= 0) {
|
if (int16_t((overflowed ^ src2) & (overflowed ^ result)) < 0) {
|
||||||
result = overflowed;
|
result = overflowed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1407,7 +1407,7 @@ void Value::VectorSub(Value* other, TypeName type, bool is_unsigned,
|
||||||
result &= -int32_t(result <= src1);
|
result &= -int32_t(result <= src1);
|
||||||
} else {
|
} else {
|
||||||
uint32_t overflowed = (src1 >> 31) + INT32_MAX;
|
uint32_t overflowed = (src1 >> 31) + INT32_MAX;
|
||||||
if (int32_t((overflowed ^ src2) & (overflowed ^ result)) >= 0) {
|
if (int32_t((overflowed ^ src2) & (overflowed ^ result)) < 0) {
|
||||||
result = overflowed;
|
result = overflowed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1435,7 +1435,7 @@ void Value::VectorSub(Value* other, TypeName type, bool is_unsigned,
|
||||||
result &= -int64_t(result <= src1);
|
result &= -int64_t(result <= src1);
|
||||||
} else {
|
} else {
|
||||||
uint64_t overflowed = (src1 >> 63) + INT64_MAX;
|
uint64_t overflowed = (src1 >> 63) + INT64_MAX;
|
||||||
if (int64_t((overflowed ^ src2) & (overflowed ^ result)) >= 0) {
|
if (int64_t((overflowed ^ src2) & (overflowed ^ result)) < 0) {
|
||||||
result = overflowed;
|
result = overflowed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue