Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions tools/clang/test/CodeGenDXIL/Ops/SpecialFloat.hlsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// RUN: %dxc -T lib_6_3 -enable-16bit-types %s | FileCheck %s

// CHECK-LABEL: test_isinf
// CHECK: call i1 @dx.op.isSpecialFloat.f16(i32 9, half
export bool test_isinf(half h) {
return isinf(h);
}

// CHECK-LABEL: test_isnan
// CHECK: call i1 @dx.op.isSpecialFloat.f16(i32 8, half

export bool test_isnan(half h) {
return isnan(h);
}

// CHECK-LABEL: test_isfinite
// CHECK: call i1 @dx.op.isSpecialFloat.f16(i32 10, half

export bool test_isfinite(half h) {
return isfinite(h);
}
6 changes: 3 additions & 3 deletions utils/hct/gen_intrin_main.txt
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@ void [[]] InterlockedXor(ref int32_only result, in uint value, out any_int32 ori
void [[]] InterlockedCompareStore(ref int32_only result, in uint compare, in uint value);
void [[]] InterlockedExchange(ref int32_only result, in uint value, out any_int32 original);
void [[]] InterlockedCompareExchange(ref int32_only result, in uint compare, in uint value, out any_int32 original);
$match<1, 0> bool<> [[rn]] isfinite(in float<> x);
$match<1, 0> bool<> [[rn]] isinf(in float<> x);
$match<1, 0> bool<> [[rn]] isnan(in float<> x);
$match<1, 0> bool<> [[rn]] isfinite(in float_like<> x);
$match<1, 0> bool<> [[rn]] isinf(in float_like<> x);
$match<1, 0> bool<> [[rn]] isnan(in float_like<> x);
$type1 [[rn]] ldexp(in float_like<> x, in $type1 exp);
$match<0, 1> float_like [[rn]] length(in float_like<c> x);
$type1 [[rn]] lerp(in float_like<> a, in $type1 b, in $type1 s);
Expand Down