[PATCH] D146142: InstCombine: Fold is.fpclass nan|zero to fcmp ueq 0

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 17 02:38:00 PDT 2023


foad added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:885
+  const FPClassTest OrderedMask = Mask & ~fcNan;
+  const FPClassTest InvertedOrderedMask = ~OrderedMask & ~fcNan;
 
----------------
This will have high bits set so how does it ever match any of the tests in fpclassTestIsFCmp0? Is there a test for that?

I think it should be `OrderedInvertedMask = ~Mask & fcAll & ~fcNan`. "Ordered inverted mask" seems more correct than "Inverted ordered mask".


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

https://reviews.llvm.org/D146142



More information about the llvm-commits mailing list