- if (CI->getBitWidth() > 64) return -1;
-
- uint64_t Size =
- TM.getDataLayout()->getTypeAllocSize(V->getType());
- uint64_t Value = CI->getZExtValue();
-
- // Make sure the constant is at least 8 bits long and has a power
- // of 2 bit width. This guarantees the constant bit width is
- // always a multiple of 8 bits, avoiding issues with padding out
- // to Size and other such corner cases.
- if (CI->getBitWidth() < 8 || !isPowerOf2_64(CI->getBitWidth())) return -1;