[all-commits] [llvm/llvm-project] ae4d39: [SystemZ] Copy Access registers and CC with the c...

Jonas Paulsson via All-commits all-commits at lists.llvm.org
Tue Mar 3 07:41:30 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ae4d39c9e4ad391b817a798aa4b5fecfbe9c6cf4
      https://github.com/llvm/llvm-project/commit/ae4d39c9e4ad391b817a798aa4b5fecfbe9c6cf4
  Author: Jonas Paulsson <paulsson at linux.vnet.ibm.com>
  Date:   2020-03-03 (Tue, 03 Mar 2020)

  Changed paths:
    M llvm/lib/Target/SystemZ/CMakeLists.txt
    M llvm/lib/Target/SystemZ/SystemZ.h
    A llvm/lib/Target/SystemZ/SystemZCopyPhysRegs.cpp
    M llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
    M llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp
    A llvm/test/CodeGen/SystemZ/tls-08.ll
    A llvm/test/CodeGen/SystemZ/tls-09.ll
    A llvm/test/CodeGen/SystemZ/tls-10.mir
    A llvm/test/CodeGen/SystemZ/tls-11.mir

  Log Message:
  -----------
  [SystemZ]  Copy Access registers and CC with the correct register class.

On SystemZ there are a set of "access registers" that can be copied in and
out of 32-bit GPRs with special instructions. These instructions can only
perform the copy using low 32-bit parts of the 64-bit GPRs. However, the
default register class for 32-bit integers is GRX32, which also contains the
high 32-bit part registers.

In order to never end up with a case of such a COPY into a high reg, this
patch adds a new simple pre-RA pass that selects such COPYs into target
instructions.

This pass also handles COPYs from CC (Condition Code register), and COPYs to
CC can now also be emitted from a high reg in copyPhysReg().

Fixes: https://bugs.llvm.org/show_bug.cgi?id=44254

Review: Ulrich Weigand.

Differential Revision: https://reviews.llvm.org/D75014




More information about the All-commits mailing list