[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / CodeGenOpenCL / builtins-amdgcn-gfx9.cl
blob87f2da20a21a6b832fb3e1abf8f8e25d599fccb0
1 // REQUIRES: amdgpu-registered-target
2 // RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu gfx900 -emit-llvm -o - %s | FileCheck %s
3 // RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu gfx1010 -emit-llvm -o - %s | FileCheck %s
5 #pragma OPENCL EXTENSION cl_khr_fp16 : enable
6 typedef unsigned int uint;
7 typedef unsigned long ulong;
9 // CHECK-LABEL: @test_fmed3_f16
10 // CHECK: call half @llvm.amdgcn.fmed3.f16(half %a, half %b, half %c)
11 void test_fmed3_f16(global half* out, half a, half b, half c)
13 *out = __builtin_amdgcn_fmed3h(a, b, c);
16 // CHECK-LABEL: @test_s_memtime
17 // CHECK: call i64 @llvm.amdgcn.s.memtime()
18 void test_s_memtime(global ulong* out)
20 *out = __builtin_amdgcn_s_memtime();
23 // CHECK-LABEL: @test_groupstaticsize
24 // CHECK: call i32 @llvm.amdgcn.groupstaticsize()
25 void test_groupstaticsize(global uint* out)
27 *out = __builtin_amdgcn_groupstaticsize();