Revert the previous commit. Go ahead and hoist rematerializable instructions.
[oota-llvm.git] / lib / CodeGen / MachineLICM.cpp
index 829583054459cba8e38d3cf2d202383d83f94416..c2adb1e8b730957fd57d7a33ab369b614e3ec0b8 100644 (file)
@@ -297,10 +297,6 @@ bool MachineLICM::IsLoopInvariantInst(MachineInstr &I) {
 void MachineLICM::Hoist(MachineInstr &MI) {
   if (!IsLoopInvariantInst(MI)) return;
 
-  // Hoisting things that are trivially rematerializable may result in worse
-  // code than before.
-  if (TII->isTriviallyReMaterializable(&MI)) return;
-
   std::vector<MachineBasicBlock*> Preds;
 
   // Non-back-edge predecessors.