Skip to content

Commit 7c75d35

Browse files
committed
add sqrt case since #86560 merged first
1 parent 29a8e76 commit 7c75d35

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

clang/lib/Sema/SemaChecking.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5634,6 +5634,7 @@ bool Sema::CheckHLSLBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {
56345634
case Builtin::BI__builtin_elementwise_log2:
56355635
case Builtin::BI__builtin_elementwise_log10:
56365636
case Builtin::BI__builtin_elementwise_pow:
5637+
case Builtin::BI__builtin_elementwise_sqrt:
56375638
case Builtin::BI__builtin_elementwise_trunc: {
56385639
if (CheckFloatOrHalfRepresentations(this, TheCall))
56395640
return true;

clang/test/SemaHLSL/BuiltIns/half-float-only-errors.hlsl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm -disable-llvm-passes -verify -DTEST_FUNC=__builtin_elementwise_log
44
// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm -disable-llvm-passes -verify -DTEST_FUNC=__builtin_elementwise_log2
55
// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm -disable-llvm-passes -verify -DTEST_FUNC=__builtin_elementwise_log10
6+
// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm -disable-llvm-passes -verify -DTEST_FUNC=__builtin_elementwise_sqrt
67
// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm -disable-llvm-passes -verify -DTEST_FUNC=__builtin_elementwise_trunc
78

89

0 commit comments

Comments
 (0)