the alignment is a power of 2, even in the esoteric case of a
vector element which does not have a power-of-2 sizeof value.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102036
91177308-0d34-0410-b5e6-
96231b3b80d8
Align = Width;
// If the alignment is not a power of 2, round up to the next power of 2.
// This happens for non-power-of-2 length vectors.
- if (VT->getNumElements() & (VT->getNumElements()-1)) {
+ if (Align & (Align-1)) {
Align = llvm::NextPowerOf2(Align);
Width = llvm::RoundUpToAlignment(Width, Align);
}