[PATCH] D47983: [IR][PatternMatch] m_APInt(): allow undef elements.

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 18 10:09:19 PDT 2018


lebedev.ri added a comment.

In https://reviews.llvm.org/D47983#1135404, @spatel wrote:

> In https://reviews.llvm.org/D47983#1134797, @lebedev.ri wrote:
>
> > Ping.
> >  Or is it intentional for `m_APInt` not to do this?
>
>
> No, it's not intentional to bail on undef when matching.
>  Until recently, all of the constant matchers failed with
>  undef elements in vectors. I enhanced most of those matchers,
>  but missed this one (and apfloat_match?).


Aha, great!

> I also made a comment in one of those patches about being careful
>  about changing the binding code, but I was probably confusing
>  api_pred_ty with this. That does need to be careful AFAICT because
>  callers may capture and use a vector with undefs when they didn't mean to.



> Sorry for the delay - LGTM.

No worries, thank you for the review!


Repository:
  rL LLVM

https://reviews.llvm.org/D47983





More information about the llvm-commits mailing list