riscv64: improve unordered comparison generated code (#5636)
Improve the generated code for unordered floating point comparisons by negating the comparison and inveritng the branches. This allows us to pick the unordered versions, which generate significantly better code.
This commit is contained in:
@@ -616,6 +616,18 @@ macro_rules! isle_common_prelude_methods {
|
||||
cc.inverse()
|
||||
}
|
||||
|
||||
fn floatcc_unordered(&mut self, cc: &FloatCC) -> bool {
|
||||
match *cc {
|
||||
FloatCC::Unordered
|
||||
| FloatCC::UnorderedOrEqual
|
||||
| FloatCC::UnorderedOrLessThan
|
||||
| FloatCC::UnorderedOrLessThanOrEqual
|
||||
| FloatCC::UnorderedOrGreaterThan
|
||||
| FloatCC::UnorderedOrGreaterThanOrEqual => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn unpack_value_array_2(&mut self, arr: &ValueArray2) -> (Value, Value) {
|
||||
let [a, b] = *arr;
|
||||
|
||||
Reference in New Issue
Block a user