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

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 22 09:05:45 PDT 2020


foad added inline comments.


================
Comment at: llvm/include/llvm/IR/PatternMatch.h:616
+/// Match a finite FP constant, i.e. not infinity or NaN.
+/// For vectors, this includes constants with undefined elements.
+inline cstfp_pred_ty<is_finite> m_Finite() {
----------------
lebedev.ri wrote:
> foad wrote:
> > lebedev.ri wrote:
> > > So if this is using `apf_pred_ty`, then this doesn't support `undef` constants then?
> > Correct. m_Finite() does, m_Finite(const APFloat *&) does not. This is the pre-existing problem I mentioned which has now been copied across from the integer matchers to the fp ones.
> But it says it does.
Yes, that's the pre-existing bug! Anyway I have now fixed this for the new float matchers, but I have not touched the existing integer matchers.


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