This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][GlobalISel] Handle rtcGPR64RegClassID in AArch64RegisterBankInfo::getRegBankFromRegClass()
ClosedPublic

Authored by tambre on Aug 11 2020, 3:40 AM.

Details

Summary

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.

Diff Detail

Event Timeline

tambre created this revision.Aug 11 2020, 3:40 AM
tambre requested review of this revision.Aug 11 2020, 3:40 AM

Per usual, if it looks good please land this for me.

tambre updated this revision to Diff 285153.Aug 12 2020, 11:51 AM

Re-generate test checks

paquette: ping

This revision is now accepted and ready to land.Aug 14 2020, 12:03 PM

Please land this for me (as "Raul Tambre <raul@tambre.ee>"). I lack commit privileges. :)

paquette: ping for landing

Oh whoops, sorry! Landing now.

Also, if you need commit access, you can e-mail Chris Lattner. He usually responds pretty quickly. :)

Will this go to the 11.x release branch? We hit the crash that this fixes on 11.0.0.

Will this go to the 11.x release branch? We hit the crash that this fixes on 11.0.0.

I've requested for this fix to be merged into 11.0.1:
https://bugs.llvm.org/show_bug.cgi?id=48198