diff options
author | Chris Lattner <sabre@nondot.org> | 2004-04-20 20:26:03 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-04-20 20:26:03 +0000 |
commit | c99acc3709f789baaf75b4ab3e1907b0226d620b (patch) | |
tree | a25be99184fc975b8d6dd305121acd02c2b43fae /lib/Transforms/Scalar/LoopUnroll.cpp | |
parent | 5ad2b1d54424f39390250d2ff11cc29312926efc (diff) |
Fix PR325
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13081 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LoopUnroll.cpp')
-rw-r--r-- | lib/Transforms/Scalar/LoopUnroll.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/LoopUnroll.cpp b/lib/Transforms/Scalar/LoopUnroll.cpp index 74724cce60..33148200b4 100644 --- a/lib/Transforms/Scalar/LoopUnroll.cpp +++ b/lib/Transforms/Scalar/LoopUnroll.cpp @@ -132,7 +132,7 @@ bool LoopUnroll::visitLoop(Loop *L) { if (!TripCountC) return Changed; // Must have constant trip count! unsigned TripCount = TripCountC->getRawValue(); - if (TripCount != TripCountC->getRawValue()) + if (TripCount != TripCountC->getRawValue() || TripCount == 0) return Changed; // More than 2^32 iterations??? unsigned LoopSize = ApproximateLoopSize(L); |