[PATCH] D77903: [SVE] Remove calls to getBitWidth from clang
Christopher Tetreault via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 13 17:25:09 PDT 2020
ctetreau updated this revision to Diff 257162.
ctetreau added a comment.
rebase
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.257162.patch
Type: text/x-patch
Size: 883 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200414/4e44433e/attachment.bin>
More information about the cfe-commits
mailing list