diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp --- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp @@ -1316,9 +1316,11 @@ if (MaxAlign == MaxMaxAlign) return; if (VectorType *VTy = dyn_cast(Ty)) { - if (MaxMaxAlign >= 32 && VTy->getBitWidth() >= 256) + if (MaxMaxAlign >= 32 && + VTy->getPrimitiveSizeInBits().getFixedSize() >= 256) MaxAlign = 32; - else if (VTy->getBitWidth() >= 128 && MaxAlign < 16) + else if (VTy->getPrimitiveSizeInBits().getFixedSize() >= 128 && + MaxAlign < 16) MaxAlign = 16; } else if (ArrayType *ATy = dyn_cast(Ty)) { unsigned EltAlign = 0;