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:
Trevor Elliott
2023-01-25 17:28:28 -08:00
committed by GitHub
parent 4ad86752de
commit 7926808e8e
4 changed files with 71 additions and 6 deletions

View File

@@ -225,6 +225,10 @@
(decl floatcc_inverse (FloatCC) FloatCC)
(extern constructor floatcc_inverse floatcc_inverse)
;; True when this FloatCC involves an unordered comparison.
(decl pure floatcc_unordered (FloatCC) bool)
(extern constructor floatcc_unordered floatcc_unordered)
;;;; Helper Clif Extractors ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; An extractor that only matches types that can fit in 16 bits.