brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · caba3e9 Raw
30 lines · plain
1// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py2// REQUIRES: amdgpu-registered-target3 4// RUN: %clang_cc1 -include __clang_hip_runtime_wrapper.h \5// RUN:   -internal-isystem %S/../../lib/Headers/cuda_wrappers \6// RUN:   -internal-isystem %S/Inputs/include \7// RUN:   -triple amdgcn-amd-amdhsa -aux-triple x86_64-unknown-unknown \8// RUN:   -target-cpu gfx906 -emit-llvm %s -fcuda-is-device -O1 -o - \9// RUN:   -D__HIPCC_RTC__ | FileCheck %s10 11// Test deprecated functions in the header that should be removed eventually12 13// CHECK-LABEL: @test_rcpf16_wrapper(14// CHECK-NEXT:  entry:15// CHECK-NEXT:    [[DIV_I:%.*]] = fdiv contract half 0xH3C00, [[X:%.*]]16// CHECK-NEXT:    ret half [[DIV_I]]17//18extern "C" __device__ _Float16 test_rcpf16_wrapper(_Float16 x) {19  return __llvm_amdgcn_rcp_f16(x);20}21 22// CHECK-LABEL: @test_rcp2f16_wrapper(23// CHECK-NEXT:  entry:24// CHECK-NEXT:    [[DIV_I:%.*]] = fdiv contract <2 x half> splat (half 0xH3C00), [[X:%.*]]25// CHECK-NEXT:    ret <2 x half> [[DIV_I]]26//27extern "C" __device__ __2f16 test_rcp2f16_wrapper(__2f16 x) {28  return __llvm_amdgcn_rcp_2f16(x);29}30