Skip to content

Commit 16ed156

Browse files
vmustyapszymich
authored andcommitted
Fix for VC kernel vector arguments
. (cherry picked from commit 5b19d84)
1 parent a7078a2 commit 16ed156

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

IGC/VectorCompiler/lib/GenXOpts/CMTrans/CMKernelArgOffset.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*========================== begin_copyright_notice ============================
22
3-
Copyright (C) 2017-2021 Intel Corporation
3+
Copyright (C) 2017-2023 Intel Corporation
44
55
SPDX-License-Identifier: MIT
66
@@ -592,8 +592,8 @@ void CMKernelArgOffset::processKernelOnOCLRT(Function *F) {
592592
DL.getPointerABIAlignment(Ty->getPointerAddressSpace()));
593593
}
594594
} else {
595-
Bytes = Ty->getPrimitiveSizeInBits() / 8;
596-
Alignment = IGCLLVM::getAlignmentValue(Ty->getScalarSizeInBits() / 8);
595+
Bytes = DL.getTypeSizeInBits(Ty) / 8;
596+
Alignment = IGCLLVM::getAlignmentValue(DL.getABITypeAlignment(Ty));
597597
}
598598
placeArg(&Arg, Bytes, Alignment);
599599
}

0 commit comments

Comments
 (0)