[PATCH] D143180: DAG: Expand legalization of is.fpclass to fcmp for DAZ
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 4 03:55:52 PDT 2023
arsenm added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:8060
if (Flags.hasNoFPExcept() &&
+ // TODO: Should check isCondCodeLegal
isOperationLegalOrCustom(ISD::SETCC, OperandVT.getScalarType())) {
----------------
sepavloff wrote:
> 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.
Checking isCondCodeLegal actually results in some x86 codegen diffs, so I'll do that separately
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143180/new/
https://reviews.llvm.org/D143180
More information about the llvm-commits
mailing list