[PATCH] D70501: [SystemZ] Don't build a PPA instruction with an immediate 0

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 21 01:18:18 PST 2019


jonpa added a comment.

In D70501#1753929 <https://reviews.llvm.org/D70501#1753929>, @uweigand wrote:

> I thought the 0 here was supposed to the the "magic"  NoRegister register number.  This is what is supposed to be used in a register slot if there's no register actually present, e.g. if an instruction has base+index address but we're not using an index in this instance.
>
> Can you check why this isn't working as I thought?


It seems to me that AddressingMode operands have explicit casts to RegisterOperand, but I can't find a way to express this for a Pat. I tried to make it work with COPY_TO_REGCLASS and COPY but failed...

It seems logical that TableGen should infer that the 0 should mean register 0 since the PPA instruction has been declared that operand to be a register, but it instead builds an immediate. Not sure if this is something that could be fixed...

Maybe using a Pseudo instruction during isel and build the PPA in Finalize Isel would be an option?


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

https://reviews.llvm.org/D70501





More information about the llvm-commits mailing list