[PATCH] D144265: DAG: Handle lowering unordered compare with inf

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 26 06:06:04 PST 2023


RKSimon added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/CodeGenCommonISel.h:227
+/// \param UseFP The intention is to perform the comparison using floating-point
+/// compare instructions which can nan tests.
+///
----------------
compare instructions which can test for nan?


================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:8034
 SDValue TargetLowering::expandIS_FPCLASS(EVT ResultVT, SDValue Op,
-                                         FPClassTest TestMask,
+                                         const FPClassTest OrigTestMask,
                                          SDNodeFlags Flags, const SDLoc &DL,
----------------
Maybe drop the const - I expect the OrigTestMask rename will have caught any changes in the function


================
Comment at: llvm/test/CodeGen/X86/is_fpclass.ll:258
+; CHECK-32-NEXT:    sahf
+; CHECK-32-NEXT:    setb %al
 ; CHECK-32-NEXT:    retl
----------------
Do you know if we have any legality/TLI callbacks that we could use to fallback to UseFP = false to avoid these regressions?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144265/new/

https://reviews.llvm.org/D144265



More information about the llvm-commits mailing list