[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 14:16:16 PDT 2017


qcolombet added inline comments.


================
Comment at: lib/Target/AArch64/AArch64InstructionSelector.cpp:709
+
+      // 0.0 is covered by tablegen.
+      if (I.getOperand(1).getFPImm()->getValueAPF().isExactlyValue(0.0))
----------------
dsanders wrote:
> qcolombet wrote:
> > I didn't get that comment.
> > Could you elaborate?
> This patch causes the rules involving fpimm0 to be imported so we no longer need to handle that case in the C++. It's not harmful to leave it in, but doing so means we can't tell if the test case passes because tablegen works or because the C++ caught it. The comment is intended to explain why we choose not to handle 0.0 in the C++ code even though it would be valid.
Make sense.
Say all that in the comment then :).


https://reviews.llvm.org/D36569





More information about the llvm-commits mailing list