Skip to content

Commit 2b351a3

Browse files
[HLSL] Remove double pow intrinsics (#86407)
Currently, the HLSL community is re-implementing its HLSL compiler, the DirectX Shader Compiler (DXC), in LLVM/main piece by piece. This change removes the pow intrinsics with parameters of type double as it is not available in DXC. Introduced in df5137e. Documentation for HLSL pow function is available here: https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-pow#parameters Closes #86181
1 parent fb39456 commit 2b351a3

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

clang/lib/Headers/hlsl/hlsl_intrinsics.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,15 +1174,6 @@ float3 pow(float3, float3);
11741174
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_pow)
11751175
float4 pow(float4, float4);
11761176

1177-
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_pow)
1178-
double pow(double, double);
1179-
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_pow)
1180-
double2 pow(double2, double2);
1181-
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_pow)
1182-
double3 pow(double3, double3);
1183-
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_pow)
1184-
double4 pow(double4, double4);
1185-
11861177
//===----------------------------------------------------------------------===//
11871178
// reversebits builtins
11881179
//===----------------------------------------------------------------------===//

clang/test/CodeGenHLSL/builtins/pow.hlsl

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,3 @@ float3 test_pow_float3(float3 p0, float3 p1) { return pow(p0, p1); }
3939
// CHECK: define noundef <4 x float> @"?test_pow_float4
4040
// CHECK: call <4 x float> @llvm.pow.v4f32
4141
float4 test_pow_float4(float4 p0, float4 p1) { return pow(p0, p1); }
42-
43-
// CHECK: define noundef double @"?test_pow_double@@YANNN@Z"(
44-
// CHECK: call double @llvm.pow.f64(
45-
double test_pow_double(double p0, double p1) { return pow(p0, p1); }
46-
// CHECK: define noundef <2 x double> @"?test_pow_double2@@YAT?$__vector@N$01@__clang@@T12@0@Z"(
47-
// CHECK: call <2 x double> @llvm.pow.v2f64
48-
double2 test_pow_double2(double2 p0, double2 p1) { return pow(p0, p1); }
49-
// CHECK: define noundef <3 x double> @"?test_pow_double3@@YAT?$__vector@N$02@__clang@@T12@0@Z"(
50-
// CHECK: call <3 x double> @llvm.pow.v3f64
51-
double3 test_pow_double3(double3 p0, double3 p1) { return pow(p0, p1); }
52-
// CHECK: define noundef <4 x double> @"?test_pow_double4@@YAT?$__vector@N$03@__clang@@T12@0@Z"(
53-
// CHECK: call <4 x double> @llvm.pow.v4f64
54-
double4 test_pow_double4(double4 p0, double4 p1) { return pow(p0, p1); }

0 commit comments

Comments
 (0)