aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CodeGenHIP/half.hip
blob: d5dd43d51fdf76ec7d6ee0ab732e918e46dead9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// REQUIRES: amdgpu-registered-target
// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -x hip -emit-llvm -fcuda-is-device -o - %s | FileCheck %s

#define __device__ __attribute__((device))

// CHECK-LABEL: @_Z2d0DF16_
// CHECK: fpext
__device__ float d0(_Float16 x) {
  return x;
}

// CHECK-LABEL: @_Z2d1f
// CHECK: fptrunc
__device__ _Float16 d1(float x) {
  return x;
}