[all-commits] [llvm/llvm-project] 30d8f4: [AVR] Fix incorrect flags of livein registers when...

Ben Shi via All-commits all-commits at lists.llvm.org
Mon Feb 27 19:09:38 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 30d8f4e8430cc757e2d1c5c6d18aa8c1c04c9256
      https://github.com/llvm/llvm-project/commit/30d8f4e8430cc757e2d1c5c6d18aa8c1c04c9256
  Author: Ben Shi <powerman1st at 163.com>
  Date:   2023-02-28 (Tue, 28 Feb 2023)

  Changed paths:
    M llvm/lib/Target/AVR/AVRFrameLowering.cpp
    A llvm/test/CodeGen/AVR/bug-56423.ll

  Log Message:
  -----------
  [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




More information about the All-commits mailing list