diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp --- a/clang/lib/CodeGen/TargetInfo.cpp +++ b/clang/lib/CodeGen/TargetInfo.cpp @@ -970,7 +970,8 @@ .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 @@ 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; }