[clang] 670f2f6 - [SVE] Remove calls to getBitWidth from clang

Christopher Tetreault via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 14 13:29:28 PDT 2020


Author: Christopher Tetreault
Date: 2020-04-14T13:29:09-07:00
New Revision: 670f2f694bba24c2c2647d48e0bdf400365c283b

URL: https://github.com/llvm/llvm-project/commit/670f2f694bba24c2c2647d48e0bdf400365c283b
DIFF: https://github.com/llvm/llvm-project/commit/670f2f694bba24c2c2647d48e0bdf400365c283b.diff

LOG: [SVE] Remove calls to getBitWidth from clang

Reviewers: efriedma

Reviewed By: efriedma

Subscribers: tschuett, rkruppe, psnobl, cfe-commits

Tags: #clang

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

Added: 
    

Modified: 
    clang/lib/CodeGen/TargetInfo.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp
index bd8b4655d2a4..22128534beda 100644
--- a/clang/lib/CodeGen/TargetInfo.cpp
+++ b/clang/lib/CodeGen/TargetInfo.cpp
@@ -970,7 +970,8 @@ static llvm::Type* X86AdjustInlineAsmType(CodeGen::CodeGenFunction &CGF,
                      .Cases("y", "&y", "^Ym", true)
                      .Default(false);
   if (IsMMXCons && Ty->isVectorTy()) {
-    if (cast<llvm::VectorType>(Ty)->getBitWidth() != 64) {
+    if (cast<llvm::VectorType>(Ty)->getPrimitiveSizeInBits().getFixedSize() !=
+        64) {
       // Invalid MMX constraint
       return nullptr;
     }
@@ -2260,7 +2261,7 @@ class X86_64ABIInfo : public SwiftABIInfo {
     if (info.isDirect()) {
       llvm::Type *ty = info.getCoerceToType();
       if (llvm::VectorType *vectorTy = dyn_cast_or_null<llvm::VectorType>(ty))
-        return (vectorTy->getBitWidth() > 128);
+        return vectorTy->getPrimitiveSizeInBits().getFixedSize() > 128;
     }
     return false;
   }


        


More information about the cfe-commits mailing list