[llvm] 85247c1 - [SVE] Remove calls to getBitWidth from x86

Christopher Tetreault via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 15 15:49:06 PDT 2020


Author: Christopher Tetreault
Date: 2020-04-15T15:48:48-07:00
New Revision: 85247c1e898f88d65154b9a437b4bd83fcad8d52

URL: https://github.com/llvm/llvm-project/commit/85247c1e898f88d65154b9a437b4bd83fcad8d52
DIFF: https://github.com/llvm/llvm-project/commit/85247c1e898f88d65154b9a437b4bd83fcad8d52.diff

LOG: [SVE] Remove calls to getBitWidth from x86

Reviewers: efriedma, RKSimon, sdesmalen

Reviewed By: RKSimon

Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77901

Added: 
    

Modified: 
    llvm/lib/Target/X86/X86ISelLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 67d0102791b1..918cb154e219 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -2202,7 +2202,7 @@ static void getMaxByValAlign(Type *Ty, unsigned &MaxAlign) {
   if (MaxAlign == 16)
     return;
   if (VectorType *VTy = dyn_cast<VectorType>(Ty)) {
-    if (VTy->getBitWidth() == 128)
+    if (VTy->getPrimitiveSizeInBits().getFixedSize() == 128)
       MaxAlign = 16;
   } else if (ArrayType *ATy = dyn_cast<ArrayType>(Ty)) {
     unsigned EltAlign = 0;


        


More information about the llvm-commits mailing list