[AArch64][GlobalISel] Handle rtcGPR64RegClassID in AArch64RegisterBankInfo::getRegBan...
authorRaul Tambre <raul@tambre.ee>
Wed, 19 Aug 2020 19:50:35 +0000 (12:50 -0700)
committerJessica Paquette <jpaquette@apple.com>
Wed, 19 Aug 2020 19:52:30 +0000 (12:52 -0700)
commite887d0e89b837be37b4279735a9c1ac57e90c995
treebab8bfe48a174047d11d1bb9b6077e94f02da022
parent15801f16194a3da6bc9ae5b869815178993303e7
[AArch64][GlobalISel] Handle rtcGPR64RegClassID in AArch64RegisterBankInfo::getRegBankFromRegClass()

TargetRegisterInfo::getMinimalPhysRegClass() returns rtcGPR64RegClassID for X16
and X17, as it's the last matching class. This in turn gets passed to
AArch64RegisterBankInfo::getRegBankFromRegClass(), which hits an unreachable.

It seems sensible to handle this case, so copies from X16 and X17 work.
Copying from X17 is used in inline assembly in libunwind for pointer
authentication.

Differential Revision: https://reviews.llvm.org/D85720
llvm/lib/Target/AArch64/GISel/AArch64RegisterBankInfo.cpp
llvm/test/CodeGen/AArch64/GlobalISel/regbankselect-default.mir