22 lines · plain
1// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \2// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \3// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s --check-prefix=HALF4 5// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \6// RUN: dxil-pc-shadermodel6.3-library %s \7// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s --check-prefix=FLOAT8 9 10// Make sure use float when not enable-16bit-types.11// FLOAT:define {{.*}}float @_Z3fooDhDh(float{{[^,]+}}, float{{[^,)]+}})12// FLOAT-NOT:half13// FLOAT:ret float %14 15// Make sure use half when enable-16bit-types.16// HALF:define {{.*}}half @_Z3fooDhDh(half{{[^,]+}}, half{{[^,)]+}})17// HALF-NOT:float18// HALF:ret half %19half foo(half a, half b) {20 return a+b;21}22