[AArch64][SVE] CodeGen of ACLE Builtin Types
Summary:
This patch adds codegen support for the ACLE builtin types added in:
https://reviews.llvm.org/D62960
so that the ACLE builtin types are emitted as corresponding scalable
vector types in LLVM.
Reviewers: rsandifo-arm, rovka, rjmccall, efriedma
Reviewed By: efriedma
Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, llvm-commits, cfe-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D74724
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp
index 1767e74..34269b2 100644
--- a/clang/lib/CodeGen/CGDecl.cpp
+++ b/clang/lib/CodeGen/CGDecl.cpp
@@ -1517,9 +1517,12 @@
// is rare.
if (!Bypasses.IsBypassed(&D) &&
!(!getLangOpts().CPlusPlus && hasLabelBeenSeenInCurrentScope())) {
- uint64_t size = CGM.getDataLayout().getTypeAllocSize(allocaTy);
+ llvm::TypeSize size =
+ CGM.getDataLayout().getTypeAllocSize(allocaTy);
emission.SizeForLifetimeMarkers =
- EmitLifetimeStart(size, AllocaAddr.getPointer());
+ size.isScalable() ? EmitLifetimeStart(-1, AllocaAddr.getPointer())
+ : EmitLifetimeStart(size.getFixedSize(),
+ AllocaAddr.getPointer());
}
} else {
assert(!emission.useLifetimeMarkers());