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

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 17 04:43:36 PDT 2023


arsenm added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:885
+  const FPClassTest OrderedMask = Mask & ~fcNan;
+  const FPClassTest InvertedOrderedMask = ~OrderedMask & ~fcNan;
 
----------------
foad wrote:
> 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".
BitmaskEnum's operators hide the clearing of the high bits for you


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

https://reviews.llvm.org/D146142



More information about the llvm-commits mailing list