[llvm] [MachineSink] Allow readReg instead of isUse (PR #204610)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 22 07:43:46 PDT 2026
================
@@ -2223,12 +2223,7 @@ static bool hasRegisterDependency(MachineInstr *MI,
break;
}
DefedRegsInCopy.push_back(Reg);
-
- // FIXME: instead of isUse(), readsReg() would be a better fix here,
- // For example, we can ignore modifications in reg with undef. However,
- // it's not perfectly clear if skipping the internal read is safe in all
- // other targets.
- } else if (MO.isUse()) {
+ } else if (MO.readsReg()) {
----------------
AZero13 wrote:
A use is not a def, so the else makes sure only uses go in.
https://github.com/llvm/llvm-project/pull/204610
More information about the llvm-commits
mailing list