[M68k] Fix the crash of fast register allocator
authorSheng <ox59616e@gmail.com>
Thu, 15 Sep 2022 01:22:15 +0000 (09:22 +0800)
committerSheng <ox59616e@gmail.com>
Thu, 15 Sep 2022 01:24:22 +0000 (09:24 +0800)
commitbea33f75e2bf1cbe3fd61b3ff7d2cc0b99391588
tree2b4821f8fac28278763ac2648ade60ad0f7687d9
parent9c7ba57e7039c4408b273404c61cc0b93f4368fd
[M68k] Fix the crash of fast register allocator

`MOVEM` is used to spill the register, which will cause problem with 1 byte data, since it only supports word (2 bytes) and long (4 bytes) size.

We change to use the normal `move` instruction to spill 1 byte data.

Fixes #57660

Reviewed By: myhsu

Differential Revision: https://reviews.llvm.org/D133636
llvm/lib/Target/M68k/M68kInstrInfo.cpp
llvm/test/CodeGen/M68k/PR57660.ll [new file with mode: 0644]