[llvm] [AMDGPU][MachineRegisterInfo] Extend the MRI live-ins check to account for Subreg (PR #126926)

Vikash Gupta via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 5 00:16:31 PST 2025


================
@@ -448,9 +448,21 @@ void MachineRegisterInfo::clearKillFlags(Register Reg) const {
 }
 
 bool MachineRegisterInfo::isLiveIn(Register Reg) const {
----------------
vg0204 wrote:

 > I don't follow. We don't need any liveness tracking to check if a physical register is live into the function. Why can't you just s/MRI.isLiveIn(Reg)/MF.begin()->isLiveIn(Reg)/?

Because as the current MBB's isLiveIn defined it won't work as expected to get rid of the issue

https://github.com/llvm/llvm-project/pull/126926


More information about the llvm-commits mailing list