[PATCH] D36569: [globalisel][tablegen] Add support for fpimm and import of APInt/APFloat based ImmLeaf.

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 12 11:27:28 PDT 2017


qcolombet accepted this revision.
qcolombet added a comment.
This revision is now accepted and ready to land.

LGTM with nitpicks.

Also, when you commit, I would do the AArch64 and X86 changes in different commits.



================
Comment at: lib/Target/AArch64/AArch64InstructionSelector.cpp:709
+
+      // 0.0 is covered by tablegen.
+      if (I.getOperand(1).getFPImm()->getValueAPF().isExactlyValue(0.0))
----------------
I didn't get that comment.
Could you elaborate?


================
Comment at: utils/TableGen/CodeGenDAGPatterns.h:485
+  /// Get the opcode used to check this predicate.
+  std::string getGlobalISelMatchOpcode() const;
+
----------------
Could we move these in GlobalISelEmitter?
Something like GlobalISelEmitter::getPredicateOpcode(TreePredicateFn)?


================
Comment at: utils/TableGen/CodeGenDAGPatterns.h:495
+  /// usable as part of an identifier.
+  std::string getImmTypeIdentifier() const;
 };
----------------
Ditto.


https://reviews.llvm.org/D36569





More information about the llvm-commits mailing list