1 // RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -target-cpu gfx906 \
2 // RUN: -aux-triple x86_64-unknown-gnu-linux -fcuda-is-device \
3 // RUN: -emit-llvm -o - -x hip %s 2>&1 | FileCheck %s
5 // RUN: %clang_cc1 -triple spirv64-amd-amdhsa \
6 // RUN: -aux-triple x86_64-unknown-gnu-linux -fcuda-is-device \
7 // RUN: -emit-llvm -o - -x hip %s 2>&1 | FileCheck %s
9 // RUN: %clang_cc1 -triple nvptx \
10 // RUN: -aux-triple x86_64-unknown-gnu-linux -fcuda-is-device \
11 // RUN: -emit-llvm -o - %s 2>&1 | FileCheck %s
13 // CHECK: @_ZN15infinity_helperIeE5valueE = {{.*}} double 0x47EFFFFFD586B834,{{.*}} align 8
14 // CHECK: @size = {{.*}} i32 8
16 #include "Inputs/cuda.h"
18 template <class> struct infinity_helper {};
19 template <> struct infinity_helper<long double> { static constexpr long double value = 3.4028234e38L; };
20 constexpr long double infinity_helper<long double>::value;
21 __device__ int size = sizeof(long double);