[PATCH] D143180: DAG: Expand legalization of is.fpclass to fcmp for DAZ

Serge Pavlov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 24 20:38:58 PDT 2023


sepavloff added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:8060
   if (Flags.hasNoFPExcept() &&
+      // TODO: Should check isCondCodeLegal
       isOperationLegalOrCustom(ISD::SETCC, OperandVT.getScalarType())) {
----------------
arsenm wrote:
> sepavloff wrote:
> > What prevents to put the check here?
> Expanded logic which I have no way of testing. If I can't write a test I'm not writing the handling for it
To test `isCondCodeLegal` here we need a target in which `SETOEQ` is not legal. It is hard to imagine that a target supports FP numbers natively but comparison of them for equality is absent. Probably this TODO is not useful and could be removed. Alternatively, you could put the call to `isCondCodeLegal` and leave it untested just because there is no way to test it. 


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

https://reviews.llvm.org/D143180



More information about the llvm-commits mailing list