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 4 5#pragma OPENCL EXTENSION cl_khr_fp16 : enable 6 7// CHECK-LABEL: @test_fmed3_f16 8// CHECK: call half @llvm.amdgcn.fmed3.f16(half %a, half %b, half %c) 9void test_fmed3_f16(global half* out, half a, half b, half c) 10{ 11 *out = __builtin_amdgcn_fmed3h(a, b, c); 12} 13