[SystemZ] Fix modelling of composed subreg indices.
authorCarl Ritson <carl.ritson@amd.com>
Tue, 21 Mar 2023 15:13:51 +0000 (16:13 +0100)
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>
Tue, 21 Mar 2023 15:39:22 +0000 (16:39 +0100)
commite7c1b4b64c314c9adb39857d92a660557217cada
tree954ed7abf51d157ad867bb31fff1c75b0c22a7fd
parent01d05bd407bb49801393098f76d1af1c769c217c
[SystemZ] Fix modelling of composed subreg indices.

A rare case where coalescing resulted in a hh32 (high32 of high64 of vector
register) subreg usage caused getSubReg() to fail as the vector reg does not
have that subreg in its subregs list, but rather h32 which was expected to
also act as hh32. See link below for the discussion when solving this.

Patch By: critson

Reviewed By: uweigand

Fixes: https://github.com/llvm/llvm-project/issues/61390
llvm/lib/Target/SystemZ/SystemZInstrFP.td
llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp
llvm/lib/Target/SystemZ/SystemZRegisterInfo.h
llvm/lib/Target/SystemZ/SystemZRegisterInfo.td
llvm/test/CodeGen/SystemZ/RAbasic-invalid-LR-update.mir
llvm/test/CodeGen/SystemZ/cond-move-05.mir
llvm/test/CodeGen/SystemZ/regalloc-fast-invalid-kill-flag.mir