[PATCH] D77903: [SVE] Remove calls to getBitWidth from clang

Christopher Tetreault via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 14 13:31:55 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG670f2f694bba: [SVE] Remove calls to getBitWidth from clang (authored by ctetreau).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77903/new/

https://reviews.llvm.org/D77903

Files:
  clang/lib/CodeGen/TargetInfo.cpp


Index: clang/lib/CodeGen/TargetInfo.cpp
===================================================================
--- clang/lib/CodeGen/TargetInfo.cpp
+++ clang/lib/CodeGen/TargetInfo.cpp
@@ -970,7 +970,8 @@
                      .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 @@
     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;
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77903.257477.patch
Type: text/x-patch
Size: 883 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200414/43669773/attachment.bin>


More information about the cfe-commits mailing list