Combine the two checks into a check if the exponent bits are 0. The
inverted case isn't reachable until a future change, and GlobalISel
currently doesn't attempt the inversion optimization.
Details
Details
Diff Detail
Diff Detail
Paths
| Differential D143182
CodeGen: Optimize lowering of is.fpclass fcZero|fcSubnormal ClosedPublic Authored by arsenm on Feb 2 2023, 6:57 AM.
Details Summary Combine the two checks into a check if the exponent bits are 0. The
Diff Detail Event Timelinearsenm added a parent revision: D143180: DAG: Expand legalization of is.fpclass to fcmp for DAZ.Feb 2 2023, 6:57 AM arsenm added a child revision: D143191: DAG: Handle inversion of fcSubnormal | fcZero.Feb 2 2023, 8:22 AM arsenm added a child revision: D143502: DAG: Handle lowering of unordered fcZero|fcSubnormal to fcmp.Feb 7 2023, 8:05 AM arsenm added a child revision: D144265: DAG: Handle lowering unordered compare with inf.Feb 17 2023, 6:53 AM arsenm marked 3 inline comments as done. Comment ActionsRebase
arsenm added a parent revision: D152094: DAG: Check isCondCodeLegal in is_fpclass expansion to fcmp eq 0.Jun 4 2023, 4:35 AM This revision is now accepted and ready to land.Jun 4 2023, 8:47 PM
Revision Contents
Diff 528206 llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/test/CodeGen/AMDGPU/llvm.is.fpclass.f16.ll
llvm/test/CodeGen/X86/is_fpclass.ll
|
Using FPClassTest may simplify the implementation a bit.