Fix PR3486. Fix a bug in code that manually patch physical register live interval...
[oota-llvm.git] / lib / CodeGen / MachineLICM.cpp
index 76d5f377949bcded755ddf987fb82c8da40b2bd2..dd32977f90b6c6f6a8ec9b8ec38664b4a8097339 100644 (file)
@@ -126,6 +126,10 @@ static bool LoopIsOuterMostWithPreheader(MachineLoop *CurLoop) {
 /// loop.
 ///
 bool MachineLICM::runOnMachineFunction(MachineFunction &MF) {
+  const Function *F = MF.getFunction();
+  if (F->hasFnAttr(Attribute::OptimizeForSize))
+    return false;
+
   DOUT << "******** Machine LICM ********\n";
 
   Changed = false;