[PATCH] D143182: CodeGen: Optimize lowering of is.fpclass fcZero|fcSubnormal

Serge Pavlov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 14 23:11:31 PDT 2023


sepavloff added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:7362
   LLT SrcTy = MRI.getType(SrcReg);
   uint64_t Mask = MI.getOperand(2).getImm();
 
----------------
Using `FPClassTest` may simplify the implementation a bit.


================
Comment at: llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:7375
 
+  // TODO: Try getInvertedFPClassTest
+
----------------
This TODO does not look clear enough.


================
Comment at: llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:7438
+                                       ExpBits, ZeroC));
+      Mask &= ~PartialCheck & fcAllFlags;
+    }
----------------
If `Mask` is `FPClassTest`, `&  fcAllFlags` is superfluous.


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

https://reviews.llvm.org/D143182



More information about the llvm-commits mailing list