[llvm] DAG: Handle lowering unordered compare with inf (PR #100378)
Serge Pavlov via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 25 10:53:38 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;
----------------
spavloff wrote:
Was `fcInf` intended here?
https://github.com/llvm/llvm-project/pull/100378
More information about the llvm-commits
mailing list