Files
clang-p2996/llvm/lib/Target/AVR/AVRFrameLowering.cpp
Ben Shi 30d8f4e843 [AVR] Fix incorrect flags of livein registers when spilling them
In AVRFrameLowering::spillCalleeSavedRegisters(), when a 16-bit
livein register is spilled, two PUSH instructions are generated
for the higher and lower 8-bit registers. But these two 8-bit
registers are marked as killed in the two PUSH instructions, so
any future use of them will cause a crash.

This patch fixes the above issue by adding the two sub 8-bit
registers to the livein list.

Fixes https://github.com/llvm/llvm-project/issues/56423

Reviewed By: jacquesguan

Differential Revision: https://reviews.llvm.org/D144720
2023-02-28 11:08:54 +08:00

17 KiB