[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
Mon Nov 25 04:32:35 PST 2019


jonpa added a comment.

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

> In D70501#1758612 <https://reviews.llvm.org/D70501#1758612>, @jonpa wrote:
>
> > This builds a register operand with NoReg, which then makes the IR correct while it is also necessary to handle this in the AsmPrinter since otherwise the call to get the register name will fail.
>
>
> Can't we handle NoRegister generically in the AsmPrinter somewhere without tying that to the specific PPA opcode?  Maybe we'll want to use it elsewhere as well ...


I thought that since generally a NoRegister could be the result of a bug somewhere in the compiler, it would be best to handle it as a special case only where it is expected. If that's not useful, I think it could be handled generally in SystemZInstPrinter.cpp, to just print '0' for any such operand. Seems like it would have to be handled both in SystemZInstPrinter::printOperand() and SystemZInstPrinter::printRegName(), but I'm not sure.


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

https://reviews.llvm.org/D70501





More information about the llvm-commits mailing list