[PATCH] D77903: [SVE] Remove calls to getBitWidth from clang
Christopher Tetreault via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 10 13:59:01 PDT 2020
ctetreau created this revision.
Herald added subscribers: cfe-commits, psnobl, rkruppe, tschuett.
Herald added a reviewer: efriedma.
Herald added a project: clang.
Repository:
rG LLVM Github Monorepo
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.256654.patch
Type: text/x-patch
Size: 883 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200410/771e0401/attachment.bin>
More information about the cfe-commits
mailing list