[TwoAddressInstruction] Constrain RegClass when processing a statepoint
authorDanila Malyutin <dmalyutin@azul.com>
Fri, 23 Dec 2022 16:47:31 +0000 (19:47 +0300)
committerDanila Malyutin <dmalyutin@azul.com>
Mon, 26 Dec 2022 16:00:34 +0000 (19:00 +0300)
commit821a59588b5bddb1fe092291910ecf2744e1e49f
tree6ed7a6b0c2eacd2b1c9b630c1c0f6a458ee5d895
parentff25800d4ba0b577a44dc918da7a1fb3c29fdb13
[TwoAddressInstruction] Constrain RegClass when processing a statepoint

This transformation could've triggered a verifier assert if RegA and RegB
were of different reg classes. Fix this by constraining as the comment
for replaceRegWith suggests.

Differential Revision: https://reviews.llvm.org/D140672
llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
llvm/test/CodeGen/AArch64/statepoint-twoaddr.mir [new file with mode: 0644]