summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Transforms/Scalar/LoopUnroll.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/LoopUnroll.cpp b/lib/Transforms/Scalar/LoopUnroll.cpp
index ff8ece2..71a5955 100644
--- a/lib/Transforms/Scalar/LoopUnroll.cpp
+++ b/lib/Transforms/Scalar/LoopUnroll.cpp
@@ -100,6 +100,11 @@ static unsigned ApproximateLoopSize(const Loop *L) {
// Ignore instructions only used by the loop terminator.
} else if (isa<DbgInfoIntrinsic>(I)) {
// Ignore debug instructions
+ } else if (isa<CallInst>(I)) {
+ if (isa<IntrinsicInst>(I))
+ Size = Size + 3;
+ else
+ Size = Size + 10;
} else {
++Size;
}