You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[HIP] Perform implicit pointer cast when compiling HIP, not when -fcuda-is-device (llvm#165387)
When compiling HIP device code, we add implicit casts for the pointer arguments passed to built-in calls.
When compiling for the host, apply the same casts, since the device side of the source (device functions and kernels) should still pass type checks.
__builtin_amdgcn_load_to_lds(src, dst, 1, 0, 0);// host-error{{cannot initialize a parameter of type '__attribute__((address_space(3))) void *' with an lvalue of type 'void *'}}
24
-
__builtin_amdgcn_load_to_lds(src, dst, 2, 0, 0);// host-error{{cannot initialize a parameter of type '__attribute__((address_space(3))) void *' with an lvalue of type 'void *'}}
25
-
__builtin_amdgcn_load_to_lds(src, dst, 4, 0, 0);// host-error{{cannot initialize a parameter of type '__attribute__((address_space(3))) void *' with an lvalue of type 'void *'}}
26
-
__builtin_amdgcn_load_to_lds(src, dst, 12, 0, 0);// host-error{{cannot initialize a parameter of type '__attribute__((address_space(3))) void *' with an lvalue of type 'void *'}}
27
-
__builtin_amdgcn_load_to_lds(src, dst, 16, 0, 0);// host-error{{cannot initialize a parameter of type '__attribute__((address_space(3))) void *' with an lvalue of type 'void *'}}
__builtin_amdgcn_load_to_lds(src, dst, 1, 0, 0);// host-error{{cannot initialize a parameter of type '__attribute__((address_space(3))) void *' with an lvalue of type 'void *'}}
50
-
__builtin_amdgcn_load_to_lds(src, dst, 2, 0, 0);// host-error{{cannot initialize a parameter of type '__attribute__((address_space(3))) void *' with an lvalue of type 'void *'}}
51
-
__builtin_amdgcn_load_to_lds(src, dst, 4, 0, 0);// host-error{{cannot initialize a parameter of type '__attribute__((address_space(3))) void *' with an lvalue of type 'void *'}}
52
-
__builtin_amdgcn_load_to_lds(src, dst, 12, 0, 0);// host-error{{cannot initialize a parameter of type '__attribute__((address_space(3))) void *' with an lvalue of type 'void *'}}
53
-
__builtin_amdgcn_load_to_lds(src, dst, 16, 0, 0);// host-error{{cannot initialize a parameter of type '__attribute__((address_space(3))) void *' with an lvalue of type 'void *'}}
0 commit comments