[all-commits] [llvm/llvm-project] b291d1: [TII] Do not fold undef copies (#147392)
Jeffrey Byrnes via All-commits
all-commits at lists.llvm.org
Thu Jul 17 02:10:13 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b291d1a71f39eb14b89b6aeccfc10bcd3c92a1ef
https://github.com/llvm/llvm-project/commit/b291d1a71f39eb14b89b6aeccfc10bcd3c92a1ef
Author: Jeffrey Byrnes <jeffrey.byrnes at amd.com>
Date: 2025-07-17 (Thu, 17 Jul 2025)
Changed paths:
M llvm/lib/CodeGen/TargetInstrInfo.cpp
A llvm/test/CodeGen/AMDGPU/regalloc-undef-copy-fold.mir
Log Message:
-----------
[TII] Do not fold undef copies (#147392)
RegallocBase::cleanupFailedVReg hacks up the state of the liveness in
order to facilitate producing valid IR. During this process, we may end
up producing undef copies.
If the destination of these copies is a spill candidate, we will attempt
to fold the source register when issuing the spill. The undef of the
source is not propagated to storeRegToStackSlot , thus we end up
dropping the undef, issuing a spill, and producing an illegal liveness
state.
This checks for undef copies, and, if found, inserts a kill instead of
spill.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list