[PATCH] D32278: [globalisel][tablegen] Import rules containing intrinsic_wo_chain.

Daniel Sanders via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 20 11:47:43 PDT 2017


dsanders added inline comments.


================
Comment at: utils/TableGen/GlobalISelEmitter.cpp:1355
+    Init *SrcChildInit = SrcChild->getLeafValue();
+    if (IntInit *SrcChildIntInit = dyn_cast<IntInit>(SrcChildInit)) {
+      OM.addPredicate<IntOperandMatcher>(SrcChildIntInit->getValue());
----------------
ab wrote:
> dsanders wrote:
> > ab wrote:
> > > This seems very lax:
> > > - it's not only accepting intrinsic IDs, but also any oddly-typed immediate
> > > - it accepts the oddly-typed immediate in any position, not just the first
> > > right?
> > > 
> > > Maybe special-case this in createAndImportSelDAGMatcher instead?
> > My thinking was that it also covered oddly typed integers that were manually written in a pattern (I don't have a particular pattern in mind though). From that perspective, the comment is badly worded since it suggests it's only for intrinsics.
> > 
> > I'm happy to hoist it out and make it more precise or to fix the comment. Do you have a preference?
> I can't think of any such patterns either, so I'd err on the side of caution and hoist it out?
Ok


https://reviews.llvm.org/D32278





More information about the llvm-commits mailing list