Skip to content

Commit

Permalink
[SVE] Remove calls to getBitWidth from PowerPC
Browse files Browse the repository at this point in the history
Reviewers: efriedma, sdesmalen, hfinkel, david-arm, fpetrogalli

Reviewed By: efriedma, fpetrogalli

Subscribers: wuzish, nemanjai, tschuett, hiraditya, kbarton, rkruppe, psnobl, shchenz, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77900
  • Loading branch information
christetreault-llvm committed Apr 20, 2020
1 parent 17e1df4 commit a9b137f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions llvm/lib/Target/PowerPC/PPCISelLowering.cpp
Expand Up @@ -1333,9 +1333,11 @@ static void getMaxByValAlign(Type *Ty, unsigned &MaxAlign,
if (MaxAlign == MaxMaxAlign)
return;
if (VectorType *VTy = dyn_cast<VectorType>(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<ArrayType>(Ty)) {
unsigned EltAlign = 0;
Expand Down

0 comments on commit a9b137f

Please sign in to comment.