[PATCH] D133438: change SM target to 6.2, that's when fnative-half-type was introduced
Joshua Batista via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 20 12:12:41 PDT 2022
bob80905 updated this revision to Diff 461654.
bob80905 added a comment.
- merge hlsl_intr.h
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133438/new/
https://reviews.llvm.org/D133438
Files:
clang/lib/Headers/hlsl/hlsl_intrinsics.h
clang/test/CodeGenHLSL/builtins/sqrt.hlsl
Index: clang/test/CodeGenHLSL/builtins/sqrt.hlsl
===================================================================
--- clang/test/CodeGenHLSL/builtins/sqrt.hlsl
+++ clang/test/CodeGenHLSL/builtins/sqrt.hlsl
@@ -1,8 +1,8 @@
// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
+// RUN: dxil-pc-shadermodel6.2-library %s -fnative-half-type \
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s
// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
+// RUN: dxil-pc-shadermodel6.2-library %s -emit-llvm -disable-llvm-passes \
// RUN: -o - | FileCheck %s --check-prefix=NO_HALF
double sqrt_d(double x)
Index: clang/lib/Headers/hlsl/hlsl_intrinsics.h
===================================================================
--- clang/lib/Headers/hlsl/hlsl_intrinsics.h
+++ clang/lib/Headers/hlsl/hlsl_intrinsics.h
@@ -13,15 +13,13 @@
__attribute__((clang_builtin_alias(__builtin_hlsl_wave_active_count_bits))) uint
WaveActiveCountBits(bool bBit);
-<<<<<<< HEAD
-=======
+
// abs builtins
__attribute__((clang_builtin_alias(__builtin_abs))) int abs(int In);
__attribute__((clang_builtin_alias(__builtin_labs))) int64_t abs(int64_t In);
__attribute__((clang_builtin_alias(__builtin_fabsf))) float abs(float In);
__attribute__((clang_builtin_alias(__builtin_fabs))) double abs(double In);
->>>>>>> cb3f11ce6110 ([HLSL] add sqrt library function)
#ifdef __HLSL_ENABLE_16_BIT
__attribute__((clang_builtin_alias(__builtin_elementwise_abs)))
int16_t abs(int16_t);
@@ -40,7 +38,7 @@
half4 abs(half4);
#endif
-<<<<<<< HEAD
+
__attribute__((clang_builtin_alias(__builtin_elementwise_abs))) int abs(int);
__attribute__((clang_builtin_alias(__builtin_elementwise_abs))) int2 abs(int2);
__attribute__((clang_builtin_alias(__builtin_elementwise_abs))) int3 abs(int3);
@@ -69,7 +67,7 @@
double3 abs(double3);
__attribute__((clang_builtin_alias(__builtin_elementwise_abs)))
double4 abs(double4);
-=======
+
// sqrt builtins
__attribute__((clang_builtin_alias(__builtin_sqrt))) double sqrt(double In);
__attribute__((clang_builtin_alias(__builtin_sqrtf))) float sqrt(float In);
@@ -77,6 +75,6 @@
#ifdef __HLSL_ENABLE_16_BIT
__attribute__((clang_builtin_alias(__builtin_sqrtf16))) half sqrt(half In);
#endif
->>>>>>> cb3f11ce6110 ([HLSL] add sqrt library function)
+
#endif //_HLSL_HLSL_INTRINSICS_H_
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133438.461654.patch
Type: text/x-patch
Size: 2521 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220920/6a41e872/attachment-0001.bin>
More information about the cfe-commits
mailing list