From: Christopher Tetreault Date: Tue, 14 Apr 2020 19:55:48 +0000 (-0700) Subject: [SVE] Remove calls to getBitWidth from clang X-Git-Tag: llvmorg-12-init~9062 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=670f2f694bba24c2c2647d48e0bdf400365c283b;p=platform%2Fupstream%2Fllvm.git [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 --- diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp index bd8b465..2212853 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(Ty)->getBitWidth() != 64) { + if (cast(Ty)->getPrimitiveSizeInBits().getFixedSize() != + 64) { // Invalid MMX constraint return nullptr; } @@ -2260,7 +2261,7 @@ public: if (info.isDirect()) { llvm::Type *ty = info.getCoerceToType(); if (llvm::VectorType *vectorTy = dyn_cast_or_null(ty)) - return (vectorTy->getBitWidth() > 128); + return vectorTy->getPrimitiveSizeInBits().getFixedSize() > 128; } return false; }