Bypass Slow Divides
[oota-llvm.git] / lib / Transforms / Scalar / CodeGenPrepare.cpp
index d71dd5dec63efd4c17e03390492d8f6ef02018a7..015fd2e6e6fcca45f498ed8a6ec1891f764b9868 100644 (file)
@@ -154,7 +154,7 @@ bool CodeGenPrepare::runOnFunction(Function &F) {
 
   /// This optimization identifies DIV instructions that can be
   /// profitably bypassed and carried out with a shorter, faster divide.
-  if (TLI && TLI->isSlowDivBypassed()) {
+  if (!OptSize && TLI && TLI->isSlowDivBypassed()) {
     const DenseMap<unsigned int, unsigned int> &BypassWidths =
        TLI->getBypassSlowDivWidths();
     for (Function::iterator I = F.begin(); I != F.end(); I++)