Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenOpenCL / builtins-amdgcn-gfx9.cl
blob3bc1811a35b71e242ad6720940c437c6046b44d7
1 // REQUIRES: amdgpu-registered-target
2 // RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu gfx900 -S -emit-llvm -o - %s | FileCheck %s
3 // RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu gfx1010 -S -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();