Fix my previous patch (r163164). It does now what it is supposed to do:
authorJakub Staszak <kubastaszak@gmail.com>
Tue, 4 Sep 2012 21:16:59 +0000 (21:16 +0000)
committerJakub Staszak <kubastaszak@gmail.com>
Tue, 4 Sep 2012 21:16:59 +0000 (21:16 +0000)
Doesn't set MadeChange to TRUE if BypassSlowDivision doesn't change anything.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163165 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/BypassSlowDivision.cpp

index af0633c512f27331ab0614f64e7b1e2d2f04e339..4130def1cb865fe83cd1963282d6edac534b94d7 100644 (file)
@@ -245,7 +245,6 @@ bool bypassSlowDivision(Function &F,
     IntegerType *BypassType = cast<IntegerType>(BT->second);
     MadeChange |= reuseOrInsertFastDiv(F, I, J, BypassType, UseDivOp,
                                        UseSignedOp, DivCache);
-    MadeChange = true;
   }
 
   return MadeChange;