xref: /aosp_15_r20/external/clang/test/CodeGenOpenCL/builtins-amdgcn-error.cl (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li// REQUIRES: amdgpu-registered-target
2*67e74705SXin Li// RUN: %clang_cc1 -triple amdgcn-unknown-amdhsa -target-cpu tahiti -verify -S -o - %s
3*67e74705SXin Li
4*67e74705SXin Li// FIXME: We only get one error if the functions are the other order in the
5*67e74705SXin Li// file.
6*67e74705SXin Li
7*67e74705SXin Litypedef unsigned long ulong;
8*67e74705SXin Li
9*67e74705SXin Liulong test_s_memrealtime()
10*67e74705SXin Li{
11*67e74705SXin Li  return __builtin_amdgcn_s_memrealtime(); // expected-error {{'__builtin_amdgcn_s_memrealtime' needs target feature s-memrealtime}}
12*67e74705SXin Li}
13*67e74705SXin Li
14*67e74705SXin Livoid test_s_sleep(int x)
15*67e74705SXin Li{
16*67e74705SXin Li  __builtin_amdgcn_s_sleep(x); // expected-error {{argument to '__builtin_amdgcn_s_sleep' must be a constant integer}}
17*67e74705SXin Li}
18*67e74705SXin Li
19