diff options
author | Craig Topper <craig.topper@sifive.com> | 2024-03-28 08:37:19 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-28 08:37:19 -0700 |
commit | f90813543b57a9753c549ac0aac083b879b94230 (patch) | |
tree | 1846cd886ceb8bf6f5f6e594c00f64a9beea7c7b /llvm/lib/CodeGen/MachineCopyPropagation.cpp | |
parent | f566b079f171f28366a66b8afa4a975bc4005529 (diff) | |
download | llvm-f90813543b57a9753c549ac0aac083b879b94230.zip llvm-f90813543b57a9753c549ac0aac083b879b94230.tar.gz llvm-f90813543b57a9753c549ac0aac083b879b94230.tar.bz2 |
[MCP] Use MachineInstr::all_defs instead of MachineInstr::defs in hasOverlappingMultipleDef. (#86889)
defs does not return the defs for inline assembly. We need to use
all_defs to find them.
Fixes #86880.
Diffstat (limited to 'llvm/lib/CodeGen/MachineCopyPropagation.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineCopyPropagation.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineCopyPropagation.cpp b/llvm/lib/CodeGen/MachineCopyPropagation.cpp index 9a0ab30..65c067e 100644 --- a/llvm/lib/CodeGen/MachineCopyPropagation.cpp +++ b/llvm/lib/CodeGen/MachineCopyPropagation.cpp @@ -640,7 +640,7 @@ bool MachineCopyPropagation::hasImplicitOverlap(const MachineInstr &MI, /// The umull instruction is unpredictable unless RdHi and RdLo are different. bool MachineCopyPropagation::hasOverlappingMultipleDef( const MachineInstr &MI, const MachineOperand &MODef, Register Def) { - for (const MachineOperand &MIDef : MI.defs()) { + for (const MachineOperand &MIDef : MI.all_defs()) { if ((&MIDef != &MODef) && MIDef.isReg() && TRI->regsOverlap(Def, MIDef.getReg())) return true; |