[PATCH] D63811: [IR][Patternmatch] Add m_SpecificInt_ULT() predicate

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 27 10:52:34 PDT 2019


spatel added a comment.

In D63811#1560905 <https://reviews.llvm.org/D63811#1560905>, @lebedev.ri wrote:

> In D63811#1560875 <https://reviews.llvm.org/D63811#1560875>, @spatel wrote:
>
> > LGTM
>
>
> Thank you for the review.
>
> > not sure if it's worth generalizing or a TODO comment, but we could take a predicate as a parameter (rather than hard-coding 'ULT') and switch the APInt compare method based on that?
>
> Do yo propose passing `ICmpInst::Predicate`?
>  I did briefly think about it, and wasn't sure it's worth it *yet*.


Yes, that's what I imagined. And yes, I have no idea if it's worth it, so a TODO comment or a mention in the commit message is enough for now.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D63811





More information about the llvm-commits mailing list