Skip to content

Commit 7186858

Browse files
Merge pull request #4364 from adrian-prantl/27891980
Debug Info: Handle vector types when extending variable live ranges.
2 parents 3357842 + 56b7b08 commit 7186858

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lib/IRGen/IRGenSIL.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -594,11 +594,14 @@ class IRGenSILFunction :
594594
if (getActiveDominancePoint() == VarDominancePoint ||
595595
isActiveDominancePointDominatedBy(VarDominancePoint)) {
596596
llvm::Type *ArgTys;
597-
auto *Ty = Storage->getType()->getScalarType();
598-
// Pointers and Floats are expected to fit into a register.
599-
if (Ty->isPointerTy() || Ty->isFloatingPointTy())
600-
ArgTys = { Storage->getType() };
597+
auto *Ty = Storage->getType();
598+
// Vectors, Pointers and Floats are expected to fit into a register.
599+
if (Ty->isPointerTy() || Ty->isFloatingPointTy() || Ty->isVectorTy())
600+
ArgTys = { Ty };
601601
else {
602+
// If this is not a scalar or vector type, we can't handle it.
603+
if (isa<llvm::CompositeType>(Ty))
604+
continue;
602605
// The storage is guaranteed to be no larger than the register width.
603606
// Extend the storage so it would fit into a register.
604607
llvm::Type *IntTy;

0 commit comments

Comments
 (0)