| /llvm-project/compiler-rt/test/ubsan/TestCases/ImplicitConversion/ |
| H A D | bitfield-conversion.c | 42 uint32_t max = UINT4_MAX; in test_a() local 44 uint8_t v8 = max + 1; in test_a() 45 uint16_t v16 = (UINT8_MAX + 1) + (max + 1); in test_a() 46 uint32_t v32 = (UINT8_MAX + 1) + (max + 1); in test_a() 64 x.a = max; in test_a() 67 x.a = max; in test_a() 81 x.a = max - 1; in test_a() 83 x.a = max - 1; in test_a() 86 x.a = max - 1; in test_a() 88 x.a = max - 1; in test_a() [all …]
|
| /llvm-project/clang-tools-extra/test/clang-tidy/checkers/modernize/ |
| H A D | min-max-use-initializer-list.cpp | 1 // RUN: %check_clang_tidy %s modernize-min-max-use-initializer-list %t 6 T max(T a, T b) { in max() function 82 const T& max( const T& a, const T& b ) { in max() function 87 T max(std::initializer_list<T> ilist) in max() function 93 const T& max( const T& a, const T& b, Compare comp ) { in max() function 98 T max(std::initializer_list<T> ilist, Compare comp) { in max() function 139 int max1 = std::max(1, std::max(2, 3)); 140 // CHECK-MESSAGES: :[[@LINE-1]]:12: warning: do not use nested 'std::max' calls, use an initializer list instead [modernize-min-max [all...] |
| /llvm-project/polly/lib/External/isl/test_inputs/codegen/omega/ |
| H A D | wak1-1.c | 5 for (int c0 = max(a3, a2); c0 <= min(min(a1 - 1, b3), b2); c0 += 1) { 9 for (int c0 = max(max(a3, b3 + 1), a2); c0 <= min(a1 - 1, b2); c0 += 1) 13 for (int c0 = max(a1, a2); c0 <= min(min(b1, a3 - 1), b2); c0 += 1) { 17 for (int c0 = max(a1, a3); c0 <= min(min(b1, b3), a2 - 1); c0 += 1) { 21 for (int c0 = max(max(a1, a3), b3 + 1); c0 <= min(b1, a2 - 1); c0 += 1) 23 for (int c0 = max(max(a1, a3), a2); c0 <= min(min(b1, b3), b2); c0 += 1) { 28 for (int c0 = max(max(max(a1, a3), b3 + 1), a2); c0 <= min(b1, b2); c0 += 1) { 32 for (int c0 = max(max(a1, a2), b2 + 1); c0 <= min(b1, a3 - 1); c0 += 1) 34 for (int c0 = max(max(a3, a2), b2 + 1); c0 <= min(a1 - 1, b3); c0 += 1) 36 for (int c0 = max(max(max(a1, a3), a2), b2 + 1); c0 <= min(b1, b3); c0 += 1) { [all …]
|
| H A D | lefur04-0.c | 2 for (int c1 = max(0, 2 * c0 - 3); c1 <= min(c0 + 1, -c0 + 6); c1 += 1) 4 …for (int c3 = max(max(max(0, c1 - (-c1 + 3) / 3), c0 - (-c2 + 3) / 3), c2 + floord(3 * c1 - c2 - 1… 5 …for (int c5 = max(max(max(max(0, 2 * c3 - 4), c1 - (-c1 + 3) / 3), c2 - (c2 + 3) / 3), c3 - (c3 + … 6 …for (int c6 = max(max(max(max(max(-200 * c1 + 400 * c3 - 199, 250 * c3 + 1), 1000 * c0 - 500 * c5 … 7 …for (int c7 = max(max(max(max(500 * c5 + 2, c6), 1000 * c0 - c6), 1000 * c3 - 2 * c6 + 2), 500 * c…
|
| /llvm-project/libcxx/test/std/time/time.traits/time.traits.duration_values/ |
| H A D | max.pass.cpp | 22 assert(std::chrono::duration_values<int>::max() == in main() 23 std::numeric_limits<int>::max()); in main() 24 assert(std::chrono::duration_values<double>::max() == in main() 25 std::numeric_limits<double>::max()); in main() 26 assert(std::chrono::duration_values<Rep>::max() == in main() 27 std::numeric_limits<Rep>::max()); in main() 29 static_assert(std::chrono::duration_values<int>::max() == in main() 30 std::numeric_limits<int>::max(), ""); in main() 31 static_assert(std::chrono::duration_values<double>::max() == in main() 32 std::numeric_limits<double>::max(), ""); in main() [all …]
|
| /llvm-project/mlir/lib/Dialect/GPU/IR/ |
| H A D | InferIntRangeInterfaceImpls.cpp | 22 static constexpr uint64_t kMaxDim = std::numeric_limits<uint32_t>::max(); 130 uint64_t max = kMaxDim; in inferResultRanges() local 132 max = specified->getZExtValue(); in inferResultRanges() 133 setResultRange(getResult(), getIndexRange(1, max)); in inferResultRanges() 138 uint64_t max = kMaxClusterDim; in inferResultRanges() local 140 max = specified->getZExtValue(); in inferResultRanges() 141 setResultRange(getResult(), getIndexRange(1, max)); in inferResultRanges() 146 uint64_t max = kMaxDim; in inferResultRanges() local 148 max = specified->getZExtValue(); in inferResultRanges() 149 setResultRange(getResult(), getIndexRange(0, max - 1ULL)); in inferResultRanges() [all …]
|
| /llvm-project/llvm/test/MC/AMDGPU/ |
| H A D | mcexpr_amd.s | 63 .set max_expression_all, max(one, two, five, three, four) 64 .set max_expression_two, max(one, two) 65 .set max_expression_one, max(one) 66 .set max_literals, max(1,2,3,4,5,6,7,8,9,10) 67 .set max_with_max_sym, max(max, 4, 3, one, two) 73 .set max_neg_numbers, max(-5, -4, -3, -2, neg_one) 74 .set max_neg_number, max(neg_one) 80 .set max_with_subexpr, max(((one | 3) << 3) / 8) 81 .set max_as_subexpr, 1 + max(4, 3, five) 82 .set max_recursive_subexpr, max(max(one, four), three, max_expression_all) [all …]
|
| /llvm-project/libcxx/test/std/numerics/bit/bitops.rot/ |
| H A D | rotr.pass.cpp | 34 T max = std::numeric_limits<T>::max(); in test() 37 assert(std::rotr(T(max - 1), 0) == T(max - 1)); in test() 38 assert(std::rotr(T(max - 1), 1) == T(max - highbit)); in test() 39 assert(std::rotr(T(max - 1), 2) == T(max - (highbit >> 1))); in test() 40 assert(std::rotr(T(max - 1), 3) == T(max in test() 33 T max = std::numeric_limits<T>::max(); test() local [all...] |
| H A D | rotl.pass.cpp | 34 T max = std::numeric_limits<T>::max(); in test() 37 assert(std::rotl(T(max - 1), 0) == T(max - 1)); in test() 38 assert(std::rotl(T(max - 1), 1) == T(max - 2)); in test() 39 assert(std::rotl(T(max - 1), 2) == T(max - 4)); in test() 40 assert(std::rotl(T(max - 1), 3) == T(max in test() 33 T max = std::numeric_limits<T>::max(); test() local [all...] |
| /llvm-project/libcxx/test/std/utilities/format/format.arguments/format.args/ |
| H A D | get.pass.cpp | 146 test<Context, int, signed char>(std::numeric_limits<signed char>::max()); in test() 151 test<Context, int, short>(std::numeric_limits<signed char>::max()); in test() 152 test<Context, int, short>(std::numeric_limits<short>::max()); in test() 158 test<Context, int, int>(std::numeric_limits<signed char>::max()); in test() 159 test<Context, int, int>(std::numeric_limits<short>::max()); in test() 160 test<Context, int, int>(std::numeric_limits<int>::max()); in test() 170 test<Context, LongToType, long>(std::numeric_limits<signed char>::max()); in test() 171 test<Context, LongToType, long>(std::numeric_limits<short>::max()); in test() 172 test<Context, LongToType, long>(std::numeric_limits<int>::max()); in test() 173 test<Context, LongToType, long>(std::numeric_limits<long>::max()); in test() [all...] |
| /llvm-project/clang/test/Analysis/ |
| H A D | additive-folding-range-constraints.c | 165 int max = INT_MAX; in mixedComparisons9() local 167 clang_analyzer_eval((a + 2) <= (max - 5LL)); // expected-warning{{TRUE}} in mixedComparisons9() 176 unsigned max = UINT_MAX; in mixedSignedness1() local 177 clang_analyzer_eval(a < max); // expected-warning{{UNKNOWN}} in mixedSignedness1() 178 clang_analyzer_eval((a + 2) < max); // expected-warning{{UNKNOWN}} in mixedSignedness1() 179 clang_analyzer_eval((a + 2U) < max); // expected-warning{{UNKNOWN}} in mixedSignedness1() 183 unsigned max = UINT_MAX; in mixedSignedness2() local 184 clang_analyzer_eval(a <= max); // expected-warning{{TRUE}} in mixedSignedness2() 185 clang_analyzer_eval((a + 2) <= max); // expected-warning{{TRUE}} in mixedSignedness2() 186 clang_analyzer_eval((a + 2U) <= max); // expected-warning{{TRUE}} in mixedSignedness2() [all …]
|
| /llvm-project/libcxx/test/std/utilities/format/format.arguments/format.arg/ |
| H A D | visit.pass.cpp | 159 test<Context, int, signed char>(std::numeric_limits<signed char>::max()); in test() 164 test<Context, int, short>(std::numeric_limits<signed char>::max()); in test() 165 test<Context, int, short>(std::numeric_limits<short>::max()); in test() 171 test<Context, int, int>(std::numeric_limits<signed char>::max()); in test() 172 test<Context, int, int>(std::numeric_limits<short>::max()); in test() 173 test<Context, int, int>(std::numeric_limits<int>::max()); in test() 182 test<Context, LongToType, long>(std::numeric_limits<signed char>::max()); in test() 183 test<Context, LongToType, long>(std::numeric_limits<short>::max()); in test() 184 test<Context, LongToType, long>(std::numeric_limits<int>::max()); in test() 185 test<Context, LongToType, long>(std::numeric_limits<long>::max()); in test() [all...] |
| H A D | visit_format_arg.pass.cpp | 163 test<Context, int, signed char>(std::numeric_limits<signed char>::max()); in test() 168 test<Context, int, short>(std::numeric_limits<signed char>::max()); in test() 169 test<Context, int, short>(std::numeric_limits<short>::max()); in test() 175 test<Context, int, int>(std::numeric_limits<signed char>::max()); in test() 176 test<Context, int, int>(std::numeric_limits<short>::max()); in test() 177 test<Context, int, int>(std::numeric_limits<int>::max()); in test() 187 test<Context, LongToType, long>(std::numeric_limits<signed char>::max()); in test() 188 test<Context, LongToType, long>(std::numeric_limits<short>::max()); in test() 189 test<Context, LongToType, long>(std::numeric_limits<int>::max()); in test() 190 test<Context, LongToType, long>(std::numeric_limits<long>::max()); in test() [all...] |
| /llvm-project/llvm/test/CodeGen/AMDGPU/ |
| H A D | attr-amdgpu-num-workgroups_error_check.ll | 3 ; ERROR: error: can't parse integer attribute -1 in amdgpu-max-num-workgroups 8 attributes #21 = {"amdgpu-max-num-workgroups"="-1,2,3"} 10 ; ERROR: error: can't parse integer attribute -2 in amdgpu-max-num-workgroups 15 attributes #22 = {"amdgpu-max-num-workgroups"="1,-2,3"} 17 ; ERROR: error: can't parse integer attribute -3 in amdgpu-max-num-workgroups 22 attributes #23 = {"amdgpu-max-num-workgroups"="1,2,-3"} 24 ; ERROR: error: can't parse integer attribute 1.0 in amdgpu-max-num-workgroups 29 attributes #31 = {"amdgpu-max-num-workgroups"="1.0,2,3"} 31 ; ERROR: error: can't parse integer attribute 2.0 in amdgpu-max-num-workgroups 36 attributes #32 = {"amdgpu-max-num-workgroups"="1,2.0,3"} [all …]
|
| /llvm-project/polly/lib/External/isl/ |
| H A D | isl_scan.c | 22 isl_int max; member 34 if (isl_int_is_zero(cnt->max) || isl_int_lt(cnt->count, cnt->max)) in increment_counter() 39 static int increment_range(struct isl_scan_callback *cb, isl_int min, isl_int max) in increment_range() argument 43 isl_int_add(cnt->count, cnt->count, max); in increment_range() 47 if (isl_int_is_zero(cnt->max) || isl_int_lt(cnt->count, cnt->max)) in increment_range() 49 isl_int_set(cnt->count, cnt->max); in increment_range() 109 struct isl_vec *max; in isl_basic_set_scan() local 125 max = isl_vec_alloc(bset->ctx, dim); in isl_basic_set_scan() 128 if (!min || !max || !snap) in isl_basic_set_scan() 161 bset->ctx->one, &max->el[level], NULL, 0); in isl_basic_set_scan() [all …]
|
| /llvm-project/mlir/test/Dialect/SPIRV/Transforms/ |
| H A D | gl-canonicalize.mlir | 5 func.func @clamp_fordlessthan(%input: f32, %min: f32, %max: f32) -> f32 { 9 %1 = spirv.FOrdLessThan %mid, %max : f32 10 %2 = spirv.Select %1, %mid, %max : i1, f32 20 func.func @clamp_fordlessthan(%input: f32, %min: f32, %max: f32) -> f32 { 24 %1 = spirv.FOrdLessThan %max, %input : f32 25 %2 = spirv.Select %1, %max, %mid : i1, f32 35 func.func @clamp_fordlessthanequal(%input: f32, %min: f32, %max: f32) -> f32 { 39 %1 = spirv.FOrdLessThanEqual %mid, %max : f32 40 %2 = spirv.Select %1, %mid, %max : i1, f32 50 func.func @clamp_fordlessthanequal(%input: f32, %min: f32, %max: f32) -> f32 { [all …]
|
| /llvm-project/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.discrete/ |
| H A D | eval.pass.cpp | 36 std::vector<Frequency> u(static_cast<std::size_t>(d.max()+1)); in tests() 37 assert(u.max_size() > static_cast<unsigned long long>(d.max())); in tests() 41 assert(d.min() <= v && v <= d.max()); in tests() 55 std::vector<Frequency> u(static_cast<std::size_t>(d.max()+1)); in tests() 56 assert(u.max_size() > static_cast<unsigned long long>(d.max())); in tests() 60 assert(d.min() <= v && v <= d.max()); in tests() 74 std::vector<Frequency> u(static_cast<std::size_t>(d.max()+1)); in tests() 75 assert(u.max_size() > static_cast<unsigned long long>(d.max())); in tests() 79 assert(d.min() <= v && v <= d.max()); in tests() 93 std::vector<Frequency> u(static_cast<std::size_t>(d.max()+1)); in tests() [all …]
|
| /llvm-project/llvm/test/Transforms/LoopVectorize/ |
| H A D | minmax_reduction.ll | 11 ; Turn this into a max reduction. Make sure we use a splat to initialize the 14 ; CHECK: %[[VAR:.*]] = insertelement <2 x i32> poison, i32 %max, i64 0 21 define i32 @max_red(i32 %max) { 27 %max.red.08 = phi i32 [ %max, %entry ], [ %max.red.0, %for.body ] 30 %cmp3 = icmp sgt i32 %0, %max.red.08 31 %max.red.0 = select i1 %cmp3, i32 %0, i32 %max.red.08 38 ret i32 %max.red.0 41 ; Turn this into a max reduction. The select has its inputs reversed therefore 42 ; this is a max reduction. 49 define i32 @max_red_inverse_select(i32 %max) { [all …]
|
| /llvm-project/libcxx/test/std/algorithms/alg.sorting/alg.min.max/ |
| H A D | ranges.minmax_element.pass.cpp | 72 assert(base(it.max) == first + expectedMax); in test_iterators() 78 assert(base(it.max) == first + expectedMax); in test_iterators() 84 assert(base(it.max) == first + expectedMax); in test_iterators() 91 assert(base(it.max) == first + expectedMax); in test_iterators() 113 assert(ret.max == a + 0); in test_borrowed_range_and_sentinel() 115 assert(*ret.max == 7); in test_borrowed_range_and_sentinel() 122 assert(ret.max == a + 5); in test_comparator() 124 assert(*ret.max == 1); in test_comparator() 133 assert(ret.max == a + 2); in test_projection() 135 assert(*ret.max == 9); in test_projection() [all …]
|
| /llvm-project/llvm/test/Transforms/InstCombine/ |
| H A D | minmax-of-minmax.ll | 12 %max = select i1 %cmp2, i32 %x, i32 %y 13 %cmp3 = icmp sgt i32 %max, %min 14 %r = select i1 %cmp3, i32 %max, i32 %min 26 %max = select i1 %cmp2, i32 %x, i32 %y 27 %cmp3 = icmp sgt i32 %max, %min 28 %r = select i1 %cmp3, i32 %max, i32 %min 40 %max = select i1 %cmp2, i32 %x, i32 %y 41 %cmp3 = icmp slt i32 %min, %max 42 %r = select i1 %cmp3, i32 %max, i32 %min 54 %max = select <2 x i1> %cmp2, <2 x i32> %x, <2 x i32> %y [all …]
|
| /llvm-project/polly/lib/External/isl/test_inputs/codegen/cloog/ |
| H A D | classen2.c | 1 for (int c0 = max(max(max(max(max(max(4, 5 * outerTimeTileScatter), 5 * outerProcTileScatter1), 5 *… 2 …for (int c1 = max(max(max(max(5 * outerProcTileScatter1, 5 * outerProcTileScatter2 + 1), -5 * oute… 3 …for (int c2 = max(max(5 * outerProcTileScatter2, -N + c1 + 2), c0 - c1 + 3); c2 <= min(min(5 * out…
|
| /llvm-project/libcxx/test/libcxx/numerics/ |
| H A D | clamp_to_integral.pass.cpp | 13 // numeric_limits<IntT>::max()/min() if the value isn't representable. 37 {static_cast<double>(Lim::max()), Lim::max(), MaxIsRepresentable}, in test() 38 {static_cast<double>(Lim::max()) + 1, Lim::max(), false}, in test() 39 {static_cast<double>(Lim::max()) + 1024, Lim::max(), false}, in test() 40 {nextafter(static_cast<double>(Lim::max()), INFINITY), Lim::max(), false}, in test() 49 assert(res == Lim::min() || res == Lim::max()); in test() [all...] |
| /llvm-project/clang/test/SemaCXX/ |
| H A D | warn-max-unsigned-zero.cpp | 6 T max(const T &, const T &); 10 auto a = std::max(55u, 0u); in test() 15 auto b = std::max(u, 0u); in test() 20 auto c = std::max(0u, 55u); in test() 25 auto d = std::max(0u, u); in test() 33 auto a = std::max(0, s); in negative_test() 34 auto b = std::max(s, 0); in negative_test() 35 auto c = std::max(22, 0); in negative_test() 36 auto d = std::max(0, 22); in negative_test() 41 return std::max(x, 0u); in template_test() [all …]
|
| /llvm-project/clang/test/CodeGenHLSL/builtins/ |
| H A D | max.hlsl | 11 int16_t test_max_short(int16_t p0, int16_t p1) { return max(p0, p1); } 14 int16_t2 test_max_short2(int16_t2 p0, int16_t2 p1) { return max(p0, p1); } 17 int16_t3 test_max_short3(int16_t3 p0, int16_t3 p1) { return max(p0, p1); } 20 int16_t4 test_max_short4(int16_t4 p0, int16_t4 p1) { return max(p0, p1); } 24 uint16_t test_max_ushort(uint16_t p0, uint16_t p1) { return max(p0, p1); } 27 uint16_t2 test_max_ushort2(uint16_t2 p0, uint16_t2 p1) { return max(p0, p1); } 30 uint16_t3 test_max_ushort3(uint16_t3 p0, uint16_t3 p1) { return max(p0, p1); } 33 uint16_t4 test_max_ushort4(uint16_t4 p0, uint16_t4 p1) { return max(p0, p1); } 38 int test_max_int(int p0, int p1) { return max(p0, p1); } 41 int2 test_max_int2(int2 p0, int2 p1) { return max(p [all...] |
| /llvm-project/llvm/test/CodeGen/PowerPC/ |
| H A D | 2011-12-06-SpillAndRestoreCR.ll | 43 %max.139 = phi float [ %0, %for.body ], [ %max.3.15, %for.inc15 ] 50 %max.235 = phi float [ %max.139, %for.cond5.preheader ], [ %max.3.15, %for.body7 ] 55 %cmp10 = fcmp ogt float %1, %max.235 60 %max.3 = select i1 %cmp10, float %1, float %max.235 64 %cmp10.1 = fcmp ogt float %4, %max.3 68 %max.3.1 = select i1 %cmp10.1, float %4, float %max.3 72 %cmp10.2 = fcmp ogt float %6, %max.3.1 76 %max.3.2 = select i1 %cmp10.2, float %6, float %max.3.1 80 %cmp10.3 = fcmp ogt float %8, %max.3.2 84 %max.3.3 = select i1 %cmp10.3, float %8, float %max.3.2 [all …]
|