[llvm] Address Codegen bug related to marking subregister MachineOperand defines as undef (PR #134929)
Ryan Buchner via llvm-commits
llvm-commits at lists.llvm.org
Tue May 6 15:05:27 PDT 2025
================
@@ -1570,6 +1570,29 @@ void LiveIntervals::handleMove(MachineInstr &MI, bool UpdateFlags) {
HMEditor HME(*this, *MRI, *TRI, OldIndex, NewIndex, UpdateFlags);
HME.updateAllRanges(&MI);
+
+ // Check to make sure that there are no subreg defintions marked undef
+ // after the moved operation. If so, mark the current instruction as undef
+ // instead.
+ for (MachineOperand &MO : MI.operands()) {
----------------
bababuck wrote:
I did do some more digging and was able to better utilize the `MachineInst` functions to clean up some of the code.
I think that expressing this in terms of `operand-is-not-undef-but-not-live-at-this-point` does make sense because that is more similar to how the verifier works.
https://github.com/llvm/llvm-project/pull/134929
More information about the llvm-commits
mailing list