Support loop unrolling on width mismatches, bug 333

This commit is contained in:
Wilson Snyder
2011-03-12 07:45:04 -05:00
parent 890dab0742
commit 2923893d34
7 changed files with 104 additions and 10 deletions
+2 -1
View File
@@ -187,8 +187,9 @@ private:
UINFO(8," In Numbers: for (v="<<valInit<<"; v<"<<valStop<<"; v=v+"<<valInc<<")\n");
//
if (!m_generate) {
UINFO(8, " ~Iters: "<<((valStop - valInit)/valInc)<<" c="<<unrollCount()<<endl);
int loops = ((valStop - valInit)/valInc);
if (loops < 0) { loops += (1ULL<<constStopp->width()); } // Will roll around
UINFO(8, " ~Iters: "<<loops<<" c="<<unrollCount()<<endl);
if (loops > unrollCount())
return cantUnroll(nodep, "too many iterations");