[PATCH] D144720: [AVR] Fix incorrect flags of livein registers when spilling them

Ben Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 24 04:10:50 PST 2023


benshi001 created this revision.
benshi001 added reviewers: jacquesguan, aykevl.
Herald added subscribers: Jim, hiraditya, dylanmckay.
Herald added a project: All.
benshi001 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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, and
any future use of them will lead to crash.

This patch fixes the above issue.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D144720

Files:
  llvm/lib/Target/AVR/AVRFrameLowering.cpp
  llvm/test/CodeGen/AVR/bug-56423.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144720.500138.patch
Type: text/x-patch
Size: 5092 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230224/cec91219/attachment.bin>


More information about the llvm-commits mailing list