xref: /llvm-project/clang/test/CodeGenHIP/spirv-amdgcn-half.hip (revision 88e2bb40921f35663e16e45514de20018615c36f)
1// RUN: %clang_cc1 -triple spirv64-amd-amdhsa -x hip -emit-llvm -fcuda-is-device -o - %s | FileCheck %s
2
3#define __device__ __attribute__((device))
4
5// CHECK-LABEL: @_Z2d0DF16_
6// CHECK: fpext
7__device__ float d0(_Float16 x) {
8  return x;
9}
10
11// CHECK-LABEL: @_Z2d1f
12// CHECK: fptrunc
13__device__ _Float16 d1(float x) {
14  return x;
15}
16