We should compare BECount with (Count - 1) instead of TripCount with xtraiter.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
We should compare BECount with (Count - 1) instead of TripCount with xtraiter.
When you commit this, make sure that the description explains why (unsigned overflow on TripCount).
Otherwise, I think this makes sense, and is consistent with how we do the tripcount < loopfactor check in the prologue case. LGTM.
lib/Transforms/Utils/LoopUnrollRuntime.cpp | ||
---|---|---|
581 | Count - 1 is a parameter to ConstantInt::get, not CreateICmpULT. I'd prefer that it be indented accordingly (so it is under BECount->getType()). |
Count - 1 is a parameter to ConstantInt::get, not CreateICmpULT. I'd prefer that it be indented accordingly (so it is under BECount->getType()).