[llvm-commits] [llvm] r54908 - /llvm/trunk/lib/CodeGen/MachineLICM.cpp

Bill Wendling isanbard at gmail.com
Sun Aug 17 17:33:51 PDT 2008


Author: void
Date: Sun Aug 17 19:33:49 2008
New Revision: 54908

URL: http://llvm.org/viewvc/llvm-project?rev=54908&view=rev
Log:
Don't hoist instructions that have implicit uses or defines. Before, it was
hoisting out some "test" and "cmp" instructions. This was obvious badness.

Modified:
    llvm/trunk/lib/CodeGen/MachineLICM.cpp

Modified: llvm/trunk/lib/CodeGen/MachineLICM.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineLICM.cpp?rev=54908&r1=54907&r2=54908&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/MachineLICM.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineLICM.cpp Sun Aug 17 19:33:49 2008
@@ -264,6 +264,11 @@
       }
     });
 
+  if (I.getDesc().getImplicitDefs() || I.getDesc().getImplicitUses()) {
+    DOUT << "Cannot hoist with implicit defines or uses\n";
+    return false;
+  }
+
   // The instruction is loop invariant if all of its operands are.
   for (unsigned i = 0, e = I.getNumOperands(); i != e; ++i) {
     const MachineOperand &MO = I.getOperand(i);





More information about the llvm-commits mailing list