[llvm] DAG: Handle lowering unordered compare with inf (PR #100378)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 26 00:59:24 PDT 2024


================
@@ -200,6 +201,14 @@ FPClassTest llvm::invertFPClassTestIfSimpler(FPClassTest Test) {
   case fcSubnormal | fcZero:
   case fcSubnormal | fcZero | fcNan:
     return InvertedTest;
+  case fcInf | fcNan:
+    // If we're trying to use fcmp, we can take advantage of the nan check
+    // behavior of the compare (but this is more instructions in the integer
+    // expansion).
+    return UseFP ? InvertedTest : fcNone;
+  case fcFinite | fcNan:
+    // Inversion of fcInf, which can be done in a combined check.
+    return fcNone;
----------------
arsenm wrote:

Probably, I think this got lost in one of the many rebases 

https://github.com/llvm/llvm-project/pull/100378


More information about the llvm-commits mailing list