Skip to content

Commit 4c0e763

Browse files
committed
Address review comments
1 parent b1d0f39 commit 4c0e763

File tree

3 files changed

+4
-40
lines changed

3 files changed

+4
-40
lines changed

clang/lib/Headers/hlsl/hlsl_intrinsics.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ void asuint(double4, out uint4, out uint4);
9090
#ifdef __HLSL_ENABLE_16_BIT
9191

9292
template <typename T, int N>
93+
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
9394
constexpr __detail::enable_if_t<__detail::is_same<int16_t, T>::value ||
9495
__detail::is_same<uint16_t, T>::value ||
9596
__detail::is_same<half, T>::value,
@@ -99,6 +100,7 @@ asuint16(vector<T, N> V) {
99100
}
100101

101102
template <typename T>
103+
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
102104
constexpr __detail::enable_if_t<__detail::is_same<int16_t, T>::value ||
103105
__detail::is_same<uint16_t, T>::value ||
104106
__detail::is_same<half, T>::value,

clang/test/CodeGenHLSL/builtins/asuint16.hlsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
//CHECK-LABEL: define {{.*}}test_ints
44
//CHECK-SAME: {{.*}}(i16 {{.*}} [[VAL:%.*]]){{.*}}
5-
// CHECK-NOT: bitcast
5+
//CHECK-NOT: bitcast
66
//CHECK: entry:
7-
// CHECK: ret i16 [[VAL]]
7+
//CHECK: ret i16 [[VAL]]
88
uint16_t test_int(int16_t p0)
99
{
1010
return asuint16(p0);

llvm/test/CodeGen/SPIRV/hlsl-intrinsics/asuint16.ll

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)