[llvm-branch-commits] [llvm-branch] r100171 - in /llvm/branches/Apple/Morbo: lib/CodeGen/MachineCSE.cpp test/CodeGen/PowerPC/2010-04-01-MachineCSEBug.ll
Evan Cheng
evan.cheng at apple.com
Thu Apr 1 19:24:46 PDT 2010
Author: evancheng
Date: Thu Apr 1 21:24:46 2010
New Revision: 100171
URL: http://llvm.org/viewvc/llvm-project?rev=100171&view=rev
Log:
Merge 100170.
Added:
llvm/branches/Apple/Morbo/test/CodeGen/PowerPC/2010-04-01-MachineCSEBug.ll
- copied unchanged from r100170, llvm/trunk/test/CodeGen/PowerPC/2010-04-01-MachineCSEBug.ll
Modified:
llvm/branches/Apple/Morbo/lib/CodeGen/MachineCSE.cpp
Modified: llvm/branches/Apple/Morbo/lib/CodeGen/MachineCSE.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/CodeGen/MachineCSE.cpp?rev=100171&r1=100170&r2=100171&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/CodeGen/MachineCSE.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/CodeGen/MachineCSE.cpp Thu Apr 1 21:24:46 2010
@@ -294,8 +294,12 @@
bool FoundCSE = VNT.count(MI);
if (!FoundCSE) {
// Look for trivial copy coalescing opportunities.
- if (PerformTrivialCoalescing(MI, MBB))
+ if (PerformTrivialCoalescing(MI, MBB)) {
+ // After coalescing MI itself may become a copy.
+ if (isCopy(MI, TII))
+ continue;
FoundCSE = VNT.count(MI);
+ }
}
// FIXME: commute commutable instructions?
More information about the llvm-branch-commits
mailing list