Skip to content

Commit fd57163

Browse files
committed
remove problematic overloads
1 parent 4d45412 commit fd57163

File tree

3 files changed

+0
-20
lines changed

3 files changed

+0
-20
lines changed

clang/lib/Headers/hlsl/hlsl_compat_overloads.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,6 @@ max(U p0, vector<T, N> p1) {
7272
return max((vector<T, N>)p0, p1);
7373
}
7474

75-
template <typename T, typename R, uint N>
76-
constexpr __detail::enable_if_t<(N > 1 && N <= 4), vector<T, N>>
77-
max(vector<T, N> p0, vector<R, N> p1) {
78-
return max(p0, (vector<T, N>)p1);
79-
}
80-
8175
template <typename U, typename V>
8276
constexpr __detail::enable_if_t<
8377
__detail::is_arithmetic<U>::Value && __detail::is_arithmetic<V>::Value, U>
@@ -103,12 +97,6 @@ min(U p0, vector<T, N> p1) {
10397
return min((vector<T, N>)p0, p1);
10498
}
10599

106-
template <typename T, typename R, uint N>
107-
constexpr __detail::enable_if_t<(N > 1 && N <= 4), vector<T, N>>
108-
min(vector<T, N> p0, vector<R, N> p1) {
109-
return min(p0, (vector<T, N>)p1);
110-
}
111-
112100
template <typename U, typename V>
113101
constexpr __detail::enable_if_t<
114102
__detail::is_arithmetic<U>::Value && __detail::is_arithmetic<V>::Value, U>

clang/test/CodeGenHLSL/builtins/max.hlsl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,6 @@ int2 test_overloads1(int2 p0, float p1) { return max(p0, p1); }
172172
// CHECK: call <2 x i32> @llvm.smax.v2i32
173173
int2 test_overloads2(int2 p0, float p1) { return max(p1, p0); }
174174

175-
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_overloads3
176-
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.maxnum.v3f32
177-
float3 test_overloads3(float3 p0, int3 p1) { return max(p0, p1); }
178-
179175
// CHECK-LABEL: define noundef nofpclass(nan inf) double {{.*}}test_overloads4
180176
// CHECK: call reassoc nnan ninf nsz arcp afn double @llvm.maxnum.f64(
181177
double test_overloads4(double p0, int p1) { return max(p0, p1); }

clang/test/CodeGenHLSL/builtins/min.hlsl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,6 @@ int2 test_overloads1(int2 p0, float p1) { return min(p0, p1); }
172172
// CHECK: call <2 x i32> @llvm.smin.v2i32
173173
int2 test_overloads2(int2 p0, float p1) { return min(p1, p0); }
174174

175-
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_overloads3
176-
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.minnum.v3f32
177-
float3 test_overloads3(float3 p0, int3 p1) { return min(p0, p1); }
178-
179175
// CHECK-LABEL: define noundef nofpclass(nan inf) double {{.*}}test_overloads4
180176
// CHECK: call reassoc nnan ninf nsz arcp afn double @llvm.minnum.f64(
181177
double test_overloads4(double p0, int p1) { return min(p0, p1); }

0 commit comments

Comments
 (0)