[all-commits] [llvm/llvm-project] 9deb4f: [CodeGen][AMDGPU] TwoAddress: Only skip undef COPY...
Felipe Quezada via All-commits
all-commits at lists.llvm.org
Fri Feb 13 08:46:53 PST 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9deb4fda30be47e4aea5671055a0f655a048afdc
https://github.com/llvm/llvm-project/commit/9deb4fda30be47e4aea5671055a0f655a048afdc
Author: Felipe Quezada <felipe.quezada01 at outlook.com>
Date: 2026-02-13 (Fri, 13 Feb 2026)
Changed paths:
M llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
A llvm/test/CodeGen/AMDGPU/twoaddr-regsequence-keep-copy-on-use.mir
Log Message:
-----------
[CodeGen][AMDGPU] TwoAddress: Only skip undef COPY at REG_SEQUENCE lowering when there is Live info or no uses for subreg (#175598)
Currently, the compiler doesn't create a COPY for undef operands while
lowering REG_SEQUENCE, and only if LIS information is available, it
propagates the undef flag to the subreg uses. So, if LIS isn't
available, we can end up with some uses without def of those lanes.
Now, we check which lanes are used in a single scan of
use_nodbg_operands() per REG_SEQ, and perform the skip of the COPY only
if LIS is avaible (as undef will be propagated later) or if there are no
uses for that lane.
There is still a scan of the use list, but now it's only one per REG_SEQ
and I think it's necessary, as there is no guarantee to have LIS or
other analysis pass information at this stage.
This is a proposal fix for issue:
https://github.com/llvm/llvm-project/issues/175596
---------
Co-authored-by: Carl Ritson <critson at perlfu.co.uk>
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