summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorCaroline Concatto <caroline.concatto@arm.com>2020-10-13 13:41:54 +0100
committerCaroline Concatto <caroline.concatto@arm.com>2020-10-15 13:25:46 +0100
commit145e44bb18853bc9beeac0e64fffd9e6895e71f9 (patch)
tree0b86b99fcf7ab09d4fe48f8d5cd2c89c786cfb89 /clang/lib/CodeGen/CGExpr.cpp
parent8f0ddd4a1a0d2e7b8004d8c3283bddf1a2e27a18 (diff)
[SVE]Fix implicit TypeSize casts in EmitCheckValue
Using TypeSize::getFixedSize() instead of relying upon the implicit TypeSize->uint64_cast as the type is always fixed width. Differential Revision: https://reviews.llvm.org/D89313
Diffstat (limited to 'clang/lib/CodeGen/CGExpr.cpp')
-rw-r--r--clang/lib/CodeGen/CGExpr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp
index 2f54097d9209..ed2c8e6a71f1 100644
--- a/clang/lib/CodeGen/CGExpr.cpp
+++ b/clang/lib/CodeGen/CGExpr.cpp
@@ -2996,7 +2996,7 @@ llvm::Value *CodeGenFunction::EmitCheckValue(llvm::Value *V) {
// Floating-point types which fit into intptr_t are bitcast to integers
// and then passed directly (after zero-extension, if necessary).
if (V->getType()->isFloatingPointTy()) {
- unsigned Bits = V->getType()->getPrimitiveSizeInBits();
+ unsigned Bits = V->getType()->getPrimitiveSizeInBits().getFixedSize();
if (Bits <= TargetTy->getIntegerBitWidth())
V = Builder.CreateBitCast(V, llvm::Type::getIntNTy(getLLVMContext(),
Bits));