[llvm] Address Codegen bug related to marking subregister MachineOperand defines as undef (PR #134929)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 13 01:49:45 PDT 2025


================
@@ -3979,6 +3979,32 @@ void GenericScheduler::reschedulePhysReg(SUnit *SU, bool isTop) {
       continue;
     LLVM_DEBUG(dbgs() << "  Rescheduling physreg copy ";
                DAG->dumpNode(*Dep.getSUnit()));
+
+    // Check to make sure that there are no subreg defintions of the given
+    // register between it's new and old location that are marked as undef. If
+    // so, mark the current instruction as undef instead.
+    SmallVector<MachineOperand *, 1> SubregDefs;
----------------
arsenm wrote:

Shouldn't need to accumulate this set 

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


More information about the llvm-commits mailing list