[Hexagon] Check if register is non-null before calling subregs_inclusive
authorSergei Barannikov <barannikov88@gmail.com>
Thu, 25 May 2023 04:50:54 +0000 (07:50 +0300)
committerSergei Barannikov <barannikov88@gmail.com>
Sun, 4 Jun 2023 09:40:04 +0000 (12:40 +0300)
commitc37e6a269ef3df0cde217feca945edfa8fcf68fe
tree3d2c3c08291a20013474911fb3744bbad27a895b
parentfbdcd54442ef9435d753ae974d33992f99d85ad8
[Hexagon] Check if register is non-null before calling subregs_inclusive

D151036 adds an assertions that prohibits iterating over sub- and
super-registers of a null register. This is already the case when
iterating over register units of a null register, and worked by
accident for sub- and super-registers.

Reviewed By: kparzysz

Differential Revision: https://reviews.llvm.org/D151406
llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp