Skip to content

Commit 56bd349

Browse files
author
Victor Lomuller
committed
make alignment a constexpr variable to be more explicit
1 parent 7c609b6 commit 56bd349

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/SYCLLowerIR/LowerWGLocalMemory.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,9 @@ static bool dynamicWGLocalMemory(Module &M) {
204204
GlobalVariable::NotThreadLocal, // ThreadLocalMode
205205
LocalAS // AddressSpace
206206
);
207+
constexpr int DefaultMaxAlignment = 128;
207208
if (!TT.isSPIROrSPIRV())
208-
LocalMemArrayGV->setAlignment(Align{128});
209+
LocalMemArrayGV->setAlignment(Align{DefaultMaxAlignment});
209210
}
210211
lowerLocalMemCall(DLMFunc, [&](CallInst *CI) {
211212
lowerDynamicLocalMemCallDirect(CI, TT, LocalMemArrayGV);

0 commit comments

Comments
 (0)