[MC] [Win64EH] Check for matches between epilogs and the prolog on ARM64
authorMartin Storsjö <martin@martin.st>
Sat, 14 May 2022 22:59:14 +0000 (01:59 +0300)
committerMartin Storsjö <martin@martin.st>
Mon, 16 May 2022 21:41:39 +0000 (00:41 +0300)
commit64a3c63e01c5f71659797acb511f18628f41d0d8
tree38325ca576f6efab6c0070e2dfd40b513799785e
parentcabefea2ec99f80ecdf9d3d5fe955831532ff4b0
[MC] [Win64EH] Check for matches between epilogs and the prolog on ARM64

This allows sharing opcodes between prolog and epilog even when there
is more than one epilog.

I didn't make any handcrafted special MC level testcases for this (yet
at least), but it does seem to have the expected effect on two existing
CodeGen level testcases.

Differential Revision: https://reviews.llvm.org/D125619
llvm/lib/MC/MCWin64EH.cpp
llvm/test/CodeGen/AArch64/wineh4.mir
llvm/test/CodeGen/AArch64/wineh8.mir