[llvm] [WIP][CodeGen] Encode liveness for COPY instructions after virtRegRewriter pass. (PR #151123)

Christudasan Devadasan via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 18 23:49:09 PDT 2025


================
@@ -474,6 +476,77 @@ bool VirtRegRewriter::readsUndefSubreg(const MachineOperand &MO) const {
   return true;
 }
 
+// Return LaneBitmask value as uint64_t for PhysReg assigned to MO,
+// representing its live register units at its parent MI. In case of undef or
+// fully live MO, return 0u.
+uint64_t VirtRegRewriter::calcLiveRegUnitMask(const MachineOperand &MO,
----------------
cdevadas wrote:

Why don't you return LaneBitmask as it is?
This can be later converted to uint64 value using `getAsInteger()` whenever required.

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


More information about the llvm-commits mailing list