Skip to content

Commit 4a6b802

Browse files
pszymichigcbot
authored andcommitted
Reset 0 alignment to 1 in LLVMWrapper.
LLVM does not accept align 0, as it is not meaningful. Instead change 0 align to byte-align (1). Related-to: IGC-3794
1 parent 7a25cd4 commit 4a6b802

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

IGC/WrapperLLVM/include/llvmWrapper/Support/Alignment.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ namespace IGCLLVM {
7474

7575
inline Align getCorrectAlign(uint32_t Val)
7676
{
77+
if (Val == 0)
78+
{
79+
// LLVM Does not accept 0 alignment.
80+
// Instead assume byte-align.
81+
Val = 1;
82+
}
7783
return Align{ Val };
7884
}
7985

0 commit comments

Comments
 (0)