[PATCH] Partial fix for bug 22589
David Majnemer
david.majnemer at gmail.com
Tue Feb 17 22:12:26 PST 2015
================
Comment at: lib/Transforms/Utils/LoopUnrollRuntime.cpp:124
@@ -118,1 +123,3 @@
+ new ICmpInst(InsertPt, ICmpInst::ICMP_ULT, BECount,
+ ConstantInt::get(BECount->getType(), Count - 1));
BasicBlock *Exit = L->getUniqueExitBlock();
----------------
If `Count` is `1`, then we are going to have `BECount u< 0`. Is this possible? If not, we should assert.
================
Comment at: lib/Transforms/Utils/LoopUnrollRuntime.cpp:322
@@ +321,3 @@
+ // BEWidth`.
+ if (static_cast<unsigned long long>(Count) > (1ULL << BEWidth))
+ return false;
----------------
Using `uint64_t` instead of `unsigned long long` might be a little more concise.
http://reviews.llvm.org/D7715
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list