Skip to content

[SYCL][CUDA] Fix sycl-cuda-host-device-functions on Windows #7939

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions clang/test/CodeGenSYCL/sycl-cuda-host-device-functions.cu
Original file line number Diff line number Diff line change
Expand Up @@ -15,55 +15,55 @@
__host__ int fun0() { return 0; }
__device__ int fun0();

// CHECK-HOST: define dso_local noundef i32 @_Z4fun0v()
// CHECK-HOST: define dso_local noundef i32 @{{.*}}fun0{{.*}}()
// CHECK-HOST: ret i32 0

// CHECK-DEV: declare noundef i32 @_Z4fun0v()
// CHECK-DEV: declare{{ dso_local | }}noundef i32 @{{.*}}fun0{{.*}}()

__device__ int fun1() { return 1; }
__host__ int fun1() { return 2; }

// CHECK-HOST: define dso_local noundef i32 @_Z4fun1v()
// CHECK-HOST: define dso_local noundef i32 @{{.*}}fun1{{.*}}()
// CHECK-HOST: ret i32 2

// CHECK-DEV: define weak_odr noundef i32 @_Z4fun1v()
// CHECK-DEV: define weak_odr{{ dso_local | }}noundef i32 @{{.*}}fun1{{.*}}()
// CHECK-DEV: ret i32 1

__host__ __device__ int fun2() { return 3; }

// CHECK-HOST: define dso_local noundef i32 @_Z4fun2v()
// CHECK-HOST: define dso_local noundef i32 @{{.*}}fun2{{.*}}()
// CHECK-HOST: ret i32 3

// CHECK-DEV: define weak_odr noundef i32 @_Z4fun2v()
// CHECK-DEV: define weak_odr{{ dso_local | }}noundef i32 @{{.*}}fun2{{.*}}()
// CHECK-DEV: ret i32 3

__host__ int fun3() { return 4; }

// CHECK-HOST: define dso_local noundef i32 @_Z4fun3v()
// CHECK-HOST: define dso_local noundef i32 @{{.*}}fun3{{.*}}()
// CHECK-HOST: ret i32 4

// CHECK-DEV: define weak_odr noundef i32 @_Z4fun3v()
// CHECK-DEV: define weak_odr{{ dso_local | }}noundef i32 @{{.*}}fun3{{.*}}()
// CHECK-DEV: ret i32 4

__device__ int fun4() { return 6; }
__host__ int fun4();

// CHECK-HOST: declare noundef i32 @_Z4fun4v()
// CHECK-HOST: declare{{ dso_local | }}noundef i32 @{{.*}}fun4{{.*}}()

// CHECK-DEV: define weak_odr noundef i32 @_Z4fun4v()
// CHECK-DEV: define weak_odr{{ dso_local | }}noundef i32 @{{.*}}fun4{{.*}}()
// CHECK-DEV: ret i32 6

__device__ int fun5() { return 5; }

// CHECK-HOST: define dso_local noundef i32 @_Z4fun5v()
// CHECK-HOST: define dso_local noundef i32 @{{.*}}fun5{{.*}}()
// CHECK-HOST: ret i32 undef

// CHECK-DEV: define weak_odr noundef i32 @_Z4fun5v()
// CHECK-DEV: define weak_odr{{ dso_local | }}noundef i32 @{{.*}}fun5{{.*}}()
// CHECK-DEV: ret i32 5

int fun6() { return 7; }

// CHECK-DEV: define dso_local noundef i32 @_Z4fun6v()
// CHECK-DEV: define dso_local noundef i32 @{{.*}}fun6{{.*}}()
// CHECK-DEV: ret i32 7

__attribute((sycl_device)) void test() {
Expand Down