[PATCH] Partial fix for bug 22589

David Majnemer david.majnemer at gmail.com
Tue Feb 17 22:08:47 PST 2015


================
Comment at: lib/Transforms/Utils/LoopUnrollRuntime.cpp:314
@@ -309,3 +313,3 @@
   // Count is the loop unroll factor, the number of extra copies added + 1.
   if ((Count & (Count-1)) != 0)
     return false;
----------------
sanjoy wrote:
> majnemer wrote:
> > Can we use isPowerOf2_32 here?
> Is it okay to assume that `unsigned` is 32 bits long?  Can it be 64 bits on a platform LLVM runs on?
This assumption is fine.  If the distinction would matter, the code would be wrong on LLVM's current platforms because LLVM IR (and transforms on it) shouldn't depend on the compiler host.

http://reviews.llvm.org/D7715

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list