[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnroll.cpp

Chris Lattner clattner at apple.com
Fri Mar 2 15:35:22 PST 2007


On Mar 2, 2007, at 3:31 PM, Reid Spencer wrote:


> +  // Guard against huge trip counts. This also guards against  
> assertions in
> +  // APInt from the use of getZExtValue, below.
> +  if (TripCountC->getValue().getActiveBits() > 32)
>      return Changed; // More than 2^32 iterations???
>
> +  uint64_t TripCountFull = TripCountC->getZExtValue();
> +  if (TripCountFull == 0)
> +    return Changed; // Zero iteraitons?
> +

Won't this still assert on 'i128 16' ?

-Chris



More information about the llvm-commits mailing list