[llvm] [LivePhysRegs] Use .asMCReg() rather than cast (NFC) (PR #155084)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 23 02:21:38 PDT 2025
https://github.com/MacDue created https://github.com/llvm/llvm-project/pull/155084
None
>From 824f2bc1064fe18ddf50dfacb5318570d92124ea Mon Sep 17 00:00:00 2001
From: MacDue <macdue at dueutil.tech>
Date: Sat, 23 Aug 2025 10:20:26 +0100
Subject: [PATCH] [LivePhysRegs] Use .asMCReg() rather than cast (NFC)
---
llvm/lib/CodeGen/LivePhysRegs.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/lib/CodeGen/LivePhysRegs.cpp b/llvm/lib/CodeGen/LivePhysRegs.cpp
index f1d31daaea530..5c8f060c09e5f 100644
--- a/llvm/lib/CodeGen/LivePhysRegs.cpp
+++ b/llvm/lib/CodeGen/LivePhysRegs.cpp
@@ -366,7 +366,7 @@ bool llvm::isPhysRegUsedAfter(Register Reg, MachineBasicBlock::iterator MBI) {
// If we hit the end of the block, check whether Reg is live into a
// successor.
for (const auto &LO : MBB->liveouts())
- if (LO.PhysReg == MCRegister(Reg) && LO.LaneMask.any())
+ if (LO.PhysReg == Reg.asMCReg() && LO.LaneMask.any())
return true;
return false;
More information about the llvm-commits
mailing list