diff options
Diffstat (limited to 'llvm/lib/CodeGen/MachineCopyPropagation.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineCopyPropagation.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineCopyPropagation.cpp b/llvm/lib/CodeGen/MachineCopyPropagation.cpp index ff75b87..224588b 100644 --- a/llvm/lib/CodeGen/MachineCopyPropagation.cpp +++ b/llvm/lib/CodeGen/MachineCopyPropagation.cpp @@ -870,6 +870,12 @@ void MachineCopyPropagation::forwardUses(MachineInstr &MI) { ++NumCopyForwards; Changed = true; } + // Attempt to canonicalize/optimize the instruction now its arguments have + // been mutated. + if (TII->simplifyInstruction(MI)) { + Changed = true; + LLVM_DEBUG(dbgs() << "MCP: After optimizeInstruction: " << MI); + } } void MachineCopyPropagation::ForwardCopyPropagateBlock(MachineBasicBlock &MBB) { |