Skip to content

Commit 8cb59d7

Browse files
committed
[SYCL][ESIMD] Pass to replace simd* parameters with native llvm vectors.
This pass is needed for the ESIMD backend to generate correct code. Author: Pratik Ashar <[email protected]> Signed-off-by: Konstantin S Bobrovsky <[email protected]>
1 parent 1b762a8 commit 8cb59d7

File tree

4 files changed

+435
-1
lines changed

4 files changed

+435
-1
lines changed

clang/test/CodeGenSYCL/esimd-private-global.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ __attribute__((opencl_private)) __attribute__((register_num(17))) int vc;
99

1010
SYCL_EXTERNAL void init_vc(int x) {
1111
vc = x;
12-
// CHECK: store i32 %0, i32* @vc
12+
// CHECK: store i32 %x, i32* @vc
1313
}
1414
// CHECK: attributes #0 = { "genx_byte_offset"="17" "genx_volatile" }

llvm/include/llvm/SYCLLowerIR/LowerESIMD.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ class ESIMDLowerLoadStorePass : public PassInfoMixin<ESIMDLowerLoadStorePass> {
4242
FunctionPass *createESIMDLowerLoadStorePass();
4343
void initializeESIMDLowerLoadStorePass(PassRegistry &);
4444

45+
ModulePass *createESIMDLowerVecArgPass();
46+
void initializeESIMDLowerVecArgLegacyPassPass(PassRegistry &);
47+
4548
} // namespace llvm
4649

4750
#endif // LLVM_SYCLLOWERIR_LOWERESIMD_H

llvm/lib/SYCLLowerIR/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ add_llvm_component_library(LLVMSYCLLowerIR
3232
LowerWGScope.cpp
3333
LowerESIMD.cpp
3434
LowerESIMDVLoadVStore.cpp
35+
LowerESIMDVecArg.cpp
3536

3637
ADDITIONAL_HEADER_DIRS
3738
${LLVM_MAIN_INCLUDE_DIR}/llvm/SYCLLowerIR

0 commit comments

Comments
 (0)