Skip to content

Commit 7f1a786

Browse files
committed
remove more problematic overloads
1 parent fd57163 commit 7f1a786

File tree

3 files changed

+0
-22
lines changed

3 files changed

+0
-22
lines changed

clang/lib/Headers/hlsl/hlsl_compat_overloads.h

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

75-
template <typename U, typename V>
76-
constexpr __detail::enable_if_t<
77-
__detail::is_arithmetic<U>::Value && __detail::is_arithmetic<V>::Value, U>
78-
max(U p0, V p1) {
79-
return max(p0, (U)p1);
80-
}
81-
8275
//===----------------------------------------------------------------------===//
8376
// min builtin overloads
8477
//===----------------------------------------------------------------------===//
@@ -97,12 +90,5 @@ min(U p0, vector<T, N> p1) {
9790
return min((vector<T, N>)p0, p1);
9891
}
9992

100-
template <typename U, typename V>
101-
constexpr __detail::enable_if_t<
102-
__detail::is_arithmetic<U>::Value && __detail::is_arithmetic<V>::Value, U>
103-
min(U p0, V p1) {
104-
return min(p0, (U)p1);
105-
}
106-
10793
} // namespace hlsl
10894
#endif // _HLSL_COMPAT_OVERLOADS_H_

clang/test/CodeGenHLSL/builtins/max.hlsl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,3 @@ int2 test_overloads1(int2 p0, float p1) { return max(p0, p1); }
171171
// CHECK-LABEL: define noundef <2 x i32> {{.*}}test_overloads2
172172
// CHECK: call <2 x i32> @llvm.smax.v2i32
173173
int2 test_overloads2(int2 p0, float p1) { return max(p1, p0); }
174-
175-
// CHECK-LABEL: define noundef nofpclass(nan inf) double {{.*}}test_overloads4
176-
// CHECK: call reassoc nnan ninf nsz arcp afn double @llvm.maxnum.f64(
177-
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
@@ -171,7 +171,3 @@ int2 test_overloads1(int2 p0, float p1) { return min(p0, p1); }
171171
// CHECK-LABEL: define noundef <2 x i32> {{.*}}test_overloads2
172172
// CHECK: call <2 x i32> @llvm.smin.v2i32
173173
int2 test_overloads2(int2 p0, float p1) { return min(p1, p0); }
174-
175-
// CHECK-LABEL: define noundef nofpclass(nan inf) double {{.*}}test_overloads4
176-
// CHECK: call reassoc nnan ninf nsz arcp afn double @llvm.minnum.f64(
177-
double test_overloads4(double p0, int p1) { return min(p0, p1); }

0 commit comments

Comments
 (0)