| 1 |
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py |
| 2 |
// REQUIRES: amdgpu-registered-target |
| 3 |
|
| 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 %s |
| 10 |
|
| 11 |
// Test deprecated functions in the header that should be removed eventually |
| 12 |
|
| 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 |
// |
| 18 |
extern "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> <half 0xH3C00, half 0xH3C00>, [[X:%.*]] |
| 25 |
// CHECK-NEXT: ret <2 x half> [[DIV_I]] |
| 26 |
// |
| 27 |
extern "C" __device__ __2f16 test_rcp2f16_wrapper(__2f16 x) { |
| 28 |
return __llvm_amdgcn_rcp_2f16(x); |
| 29 |
} |