[PATCH] D61321: [globalisel] Allow SrcOp to convert an APInt and render it as an immediate operand (MO.isImm() == true)

Daniel Sanders via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 30 13:42:27 PDT 2019


dsanders added a comment.

In D61321#1484604 <https://reviews.llvm.org/D61321#1484604>, @arsenm wrote:

> For the use cases, I think this should just be int64_t instead of APInt


int64_t was my first thought for it but I got rather worried about the potential mistakes due to registers being `unsigned`. For example, is `1` a register or an immediate? It turned out that my worries were moot as the compiler doesn't allow both an unsigned and an int64_t overload anyway (https://godbolt.org/z/zO8LhX)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D61321





More information about the llvm-commits mailing list