[PATCH] D36086: [globalisel][tablegen] Add support for ImmLeaf without SDNodeXForm

Daniel Sanders via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 23 03:16:01 PDT 2017


dsanders added inline comments.


================
Comment at: include/llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h:143
+             "Expected G_CONSTANT");
+      assert(Predicate > 0 /*GIPFP_Invalid*/ && "Expected a valid predicate");
+      int64_t Value = 0;
----------------
rovka wrote:
> Supernit: Predicate != GIPFP_Invalid seems more direct and readable...
Thanks for spotting this. The `0 /* GIPFP_Invalid */` bit was an intermediate step caused by a circular dependency problem. I fixed that in this update but it looks like I didn't correct this bit afterwards. I'll correct this in the commit

The reason for `Predicate > GIPFP_Invalid` is that the table consists of signed integers and valid predicates are all positive non-zeros.


https://reviews.llvm.org/D36086





More information about the llvm-commits mailing list