[PATCH] D89038: [PatternMatch] Add new FP matchers. NFC.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 16 05:33:34 PDT 2020


RKSimon added inline comments.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:5310
   const APFloat *FC1;
-  if (CmpRHS != TrueVal || !match(CmpRHS, m_APFloat(FC1)) || !FC1->isFinite())
+  if (CmpRHS != TrueVal || !match(CmpRHS, m_Finite(FC1)))
     return {SPF_UNKNOWN, SPNB_NA, false};
----------------
foad wrote:
> RKSimon wrote:
> > m_APFloat didn't match constant vectors containing undefs but m_Finite will? Again, we need test coverage for this.
> Since this whole function does support vectors yet, there's NFC here and nothing to test.
OK - in which case a TODO comment plus an assert that !getType->isVectorTy() at the top of the function would be fine.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89038



More information about the llvm-commits mailing list