[PATCH] D62423: [globalisel][legalizer] Attempt to write down the minimal legalization rules

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 27 17:50:38 PDT 2019


arsenm added inline comments.


================
Comment at: llvm/docs/GlobalISel.rst:464-465
+
+There are no minimum rules for pointers since G_INTTOPTR and G_PTRTOINT can
+be lowered to COPY (or to nothing using replaceAllUses()) by the legalizer.
+
----------------
dsanders wrote:
> arsenm wrote:
> > arsenm wrote:
> > > This ignores the existence of non-integral pointers
> > This should also probably say "selected" to copy, since IIRC COPY is not allowed to convert the type with generic virtual registers
> > This ignores the existence of non-integral pointers
> 
> How are those represented in gMIR? I haven't had to deal with them
> 
> > This should also probably say "selected" to copy, since IIRC COPY is not allowed to convert the type with generic virtual registers
> 
> That's a good point, it needs to be constrained to a register class otherwise the types have to match.
They're the same as any other, it's just a field in the datalayout. The target defines these, so some set of operations on them must be legal. G_PTRTOINT/G_INTTOPTR is not allowed for them


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62423





More information about the llvm-commits mailing list