Index: lib/Transforms/Scalar/LICM.cpp =================================================================== --- lib/Transforms/Scalar/LICM.cpp +++ lib/Transforms/Scalar/LICM.cpp @@ -945,13 +945,13 @@ // instruction will be executed, update the alignment. // Larger is better, with the exception of 0 being the best alignment. unsigned InstAlignment = Store->getAlignment(); - if ((InstAlignment > Alignment || InstAlignment == 0) && Alignment != 0) + if ((InstAlignment > Alignment || InstAlignment == 0) && + Alignment != 0) { if (isGuaranteedToExecute(*UI, DT, CurLoop, SafetyInfo)) { GuaranteedToExecute = true; Alignment = InstAlignment; } - - if (!GuaranteedToExecute) + } else if (!GuaranteedToExecute) GuaranteedToExecute = isGuaranteedToExecute(*UI, DT, CurLoop, SafetyInfo);