/llvm-project/lld/test/ELF/ |
H A D | common-page.s | 10 # Increase max-page-size to 64k while using the default x86_64 common page size 14 # RUN: ld.lld -z max-page-size=0x10000 -z common-page-size=0x1000 %t -o %t2 2>&1 | count 0 15 # RUN: llvm-readobj --sections -l %t2 | FileCheck --check-prefix=CHECK-MAX %s 17 # CHECK-MAX: Sections [ 18 # CHECK-MAX-NEXT: Section { 19 # CHECK-MAX-NEXT: Index: 0 20 # CHECK-MAX-NEXT: Name: (0) 21 # CHECK-MAX-NEXT: Type: SHT_NULL (0x0) 22 # CHECK-MAX-NEXT: Flags [ (0x0) 23 # CHECK-MAX-NEXT: ] [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/llvm/unittests/Support/ |
H A D | CheckedArithmeticTest.cpp | 9 const int64_t Max = std::numeric_limits<int64_t>::max(); in TEST() local 11 EXPECT_EQ(checkedAdd<int64_t>(Max, Max), std::nullopt); in TEST() 13 EXPECT_EQ(checkedAdd<int64_t>(Max, 1), std::nullopt); in TEST() 18 const int16_t Max = std::numeric_limits<int16_t>::max(); in TEST() local 20 EXPECT_EQ(checkedAdd<int16_t>(Max, Max), std::nullopt); in TEST() 22 EXPECT_EQ(checkedAdd<int16_t>(Max, 1), std::nullopt); in TEST() 27 const int64_t Max = std::numeric_limits<int64_t>::max(); in TEST() local 29 EXPECT_EQ(checkedMul<int64_t>(Max, 2), std::nullopt); in TEST() 30 EXPECT_EQ(checkedMul<int64_t>(Max, Max), std::nullopt); in TEST() 36 const int64_t Max = std::numeric_limits<int64_t>::max(); in TEST() local [all …]
|
H A D | MathExtrasTest.cpp | 62 EXPECT_EQ(std::numeric_limits<int32_t>::max(), maxIntN(32)); in TEST() 63 EXPECT_EQ(std::numeric_limits<int64_t>::max(), maxIntN(64)); in TEST() 204 EXPECT_EQ(std::numeric_limits<uint32_t>::max(), in TEST() 205 alignTo(std::numeric_limits<uint32_t>::max(), 2, 1)); in TEST() 212 EXPECT_EQ(0u, alignTo(std::numeric_limits<uint32_t>::max(), 2)); in TEST() 225 EXPECT_EQ(0u, alignToPowerOf2(std::numeric_limits<uint32_t>::max(), 2)); in TEST() 231 EXPECT_EQ(std::numeric_limits<uint32_t>::max() - 1, 232 alignDown(std::numeric_limits<uint32_t>::max(), 2)); in SaturatingAddTestHelper() 236 const T Max = std::numeric_limits<T>::max(); in SaturatingAddTestHelper() 233 const T Max = std::numeric_limits<T>::max(); SaturatingAddTestHelper() local 303 const T Max = std::numeric_limits<T>::max(); SaturatingMultiplyTestHelper() local 383 const T Max = std::numeric_limits<T>::max(); SaturatingMultiplyAddTestHelper() local [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 …]
|
/llvm-project/clang/unittests/StaticAnalyzer/ |
H A D | RangeSetTest.cpp | 57 static constexpr T MAX = std::numeric_limits<T>::max(); member 63 static constexpr T A = MID - (MAX - MID) / 3 * 2; 64 static constexpr T B = MID - (MAX - MID) / 3; 68 static_assert(MIN < A && A < B && B < MID && MID < C && C < D && D < MAX, 287 constexpr auto MAX = TV::MAX; in TYPED_TEST() local 294 this->checkNegate({{MIN, A}}, {{MIN, MIN}, {D, MAX}}); in TYPED_TEST() 295 this->checkNegate({{MIN, C}}, {{MIN, MIN}, {B, MAX}}); in TYPED_TEST() 296 this->checkNegate({{MIN, MID}}, {{MIN, MIN}, {MID, MAX}}); in TYPED_TEST() 323 constexpr auto MAX = TV::MAX; TYPED_TEST() local 390 constexpr auto MAX = TV::MAX; TYPED_TEST() local 423 constexpr auto MAX = TV::MAX; TYPED_TEST() local 442 constexpr auto MAX = TV::MAX; TYPED_TEST() local 743 constexpr auto MAX = TV::MAX; TYPED_TEST() local 785 constexpr auto MAX = TV::MAX; TYPED_TEST() local 827 constexpr auto MAX = TV::MAX; TYPED_TEST() local 914 constexpr auto MAX = TV::MAX; TYPED_TEST() local 959 constexpr auto MAX = TV::MAX; TYPED_TEST() local 1024 constexpr auto MAX = TV::MAX; TYPED_TEST() local [all...] |
/llvm-project/clang/test/CodeGenCXX/ |
H A D | auto-var-init-max-size.cpp | 1 // Pattern related max size tests: 1, 1024, 4096 2 …ern -ftrivial-auto-var-init-max-size=1 %s -emit-llvm -o - | FileCheck -check-prefix=PATTERN-COMMON… 3 …rn -ftrivial-auto-var-init-max-size=1024 %s -emit-llvm -o - | FileCheck -check-prefix=PATTERN-COMM… 4 …rn -ftrivial-auto-var-init-max-size=4096 %s -emit-llvm -o - | FileCheck -check-prefix=PATTERN-COMM… 6 // Zero related max size tests: 1, 1024, 4096 7 …t=zero -ftrivial-auto-var-init-max-size=1 %s -emit-llvm -o - | FileCheck -check-prefix=ZERO-COMMON… 8 …=zero -ftrivial-auto-var-init-max-size=1024 %s -emit-llvm -o - | FileCheck -check-prefix=ZERO-COMM… 9 …=zero -ftrivial-auto-var-init-max-size=4096 %s -emit-llvm -o - | FileCheck -check-prefix=ZERO-COMM… 34 // - COMMON (auto-init regardless of the max size): "var_vla", and "%5" in foo() 35 // - Max size 1: "var_size_1" in foo() [all …]
|
/llvm-project/flang/test/Semantics/ |
H A D | call23.f90 | 2 ! Check errors on MAX/MIN with keywords, a weird case in Fortran 4 !ERROR: argument keyword 'a1=' was repeated in call to 'max' 5 print *, max(a1=x,a1=1) 6 !ERROR: keyword argument 'a1=' to intrinsic 'max' was supplied positionally by an earlier actual ar… 7 print *, max(x,a1=1) 10 print *, max(a1=x,a2=0,a4=0) ! ok 11 print *, max(x,0,a99=0) ! ok 12 !ERROR: argument keyword 'a06=' is not known in call to 'max' 13 print *, max(a1=x,a2=0,a06=0) 15 print *, max(a3=y, a1=x) [all …]
|
/llvm-project/mlir/test/Dialect/SPIRV/Transforms/ |
H A D | gl-canonicalize.mlir | 4 // CHECK-SAME: (%[[INPUT:.*]]: f32, %[[MIN:.*]]: f32, %[[MAX:.*]]: f32) 5 func.func @clamp_fordlessthan(%input: f32, %min: f32, %max: f32) -> f32 { 6 // CHECK: [[RES:%.*]] = spirv.GL.FClamp %[[INPUT]], %[[MIN]], %[[MAX]] 9 %1 = spirv.FOrdLessThan %mid, %max : f32 10 %2 = spirv.Select %1, %mid, %max : i1, f32 19 // CHECK-SAME: (%[[INPUT:.*]]: f32, %[[MIN:.*]]: f32, %[[MAX:.*]]: f32) 20 func.func @clamp_fordlessthan(%input: f32, %min: f32, %max: f32) -> f32 { 21 // CHECK: [[RES:%.*]] = spirv.GL.FClamp %[[INPUT]], %[[MIN]], %[[MAX]] 24 %1 = spirv.FOrdLessThan %max, %input : f32 25 %2 = spirv.Select %1, %max, %mid : i1, f32 [all …]
|
/llvm-project/clang-tools-extra/test/clang-tidy/checkers/readability/ |
H A D | use-std-min-max.cpp | 1 // RUN: %check_clang_tidy -std=c++11-or-later %s readability-use-std-min-max %t -- -- -fno-delayed-template-parsing 28 // CHECK-MESSAGES: :[[@LINE+2]]:3: warning: use `std::max` instead of `<` [readability-use-std-min-max] in foo() 29 // CHECK-FIXES: value1 = std::max(value1, value2); in foo() 33 // CHECK-MESSAGES: :[[@LINE+2]]:3: warning: use `std::min` instead of `<` [readability-use-std-min-max] in foo() 38 // CHECK-MESSAGES: :[[@LINE+2]]:3: warning: use `std::min` instead of `>` [readability-use-std-min-max] in foo() 43 // CHECK-MESSAGES: :[[@LINE+2]]:3: warning: use `std::max` instead of `>` [readability-use-std-min-max] in foo() 44 // CHECK-FIXES: value1 = std::max(value2, value1); in foo() 52 // CHECK-MESSAGES: :[[@LINE+3]]:3: warning: use `std::max` instea in foo() [all...] |
/llvm-project/llvm/test/Transforms/InstCombine/ |
H A D | minmax-of-minmax.ll | 6 ; CHECK-NEXT: [[MAX:%.*]] = call i32 @llvm.smax.i32(i32 [[Y:%.*]], i32 [[X:%.*]]) 7 ; CHECK-NEXT: ret i32 [[MAX]] 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 20 ; CHECK-NEXT: [[MAX:%.*]] = call i32 @llvm.smax.i32(i32 [[X:%.*]], i32 [[Y:%.*]]) 21 ; CHECK-NEXT: ret i32 [[MAX]] 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 [all …]
|
/llvm-project/llvm/test/Transforms/LoopVectorize/X86/ |
H A D | strided_load_cost.ll | 3 ; RUN: opt < %s -passes=loop-vectorize -vectorizer-maximize-bandwidth -S -o - | FileCheck --check-prefix=MAX-BW %s 245 ; MAX-BW-LABEL: @matrix_row_col( 246 ; MAX-BW-NEXT: iter.check: 247 ; MAX-BW-NEXT: [[IDXPROM:%.*]] = sext i32 [[I:%.*]] to i64 248 ; MAX-BW-NEXT: [[IDXPROM5:%.*]] = sext i32 [[J:%.*]] to i64 249 ; MAX-BW-NEXT: br i1 false, label [[SCALAR_PH:%.*]], label [[VECTOR_PH:%.*]] 250 ; MAX-BW: vector.main.loop.iter.check: 251 ; MAX-BW-NEXT: br i1 false, label [[VEC_EPILOG_PH:%.*]], label [[VECTOR_PH1:%.*]] 252 ; MAX-BW: vector.ph: 253 ; MAX [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/llvm/test/Transforms/AggressiveInstCombine/X86/ |
H A D | fptosisat.ll | 8 ; CHECK-NEXT: [[MAX:%.*]] = call i64 @llvm.smax.i64(i64 [[MIN]], i64 -2147483648) 9 ; CHECK-NEXT: ret i64 [[MAX]] 13 %max = call i64 @llvm.smax.i64(i64 %min, i64 -2147483648) 14 ret i64 %max 21 ; CHECK-NEXT: [[MAX:%.*]] = call i64 @llvm.smax.i64(i64 [[MIN]], i64 -1073741824) 22 ; CHECK-NEXT: ret i64 [[MAX]] 26 %max = call i64 @llvm.smax.i64(i64 %min, i64 -1073741824) 27 ret i64 %max 34 ; CHECK-NEXT: [[MAX:%.*]] = call i32 @llvm.smax.i32(i32 [[MIN]], i32 -32768) 35 ; CHECK-NEXT: ret i32 [[MAX]] [all...] |
/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/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/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/Transforms/ConstraintElimination/ |
H A D | pointercast.ll | 4 define i1 @gep0_and_cmp(ptr readonly %src, ptr readnone %min, ptr readnone %max) { 12 ; CHECK-NEXT: [[C_MAX_3:%.*]] = icmp ugt ptr [[GEP_3_C]], [[MAX:%.*]] 18 ; CHECK-NEXT: [[C_3_MAX:%.*]] = icmp ult ptr [[GEP_3]], [[MAX]] 25 ; CHECK-NEXT: [[C_4_MAX:%.*]] = icmp ult ptr [[GEP_4]], [[MAX]] 39 %c.max.3 = icmp ugt ptr %gep.3.c, %max 41 %or = or i1 %c.min.0, %c.max.3 49 %c.3.max = icmp ult ptr %gep.3, %max 50 %res.1 = xor i1 %c.3.min, %c.3.max 54 %c.1.max = icmp ult ptr %gep.1, %max 55 %res.2 = xor i1 %c.1.min, %c.1.max [all …]
|
H A D | geps-unsigned-predicates.ll | 4 define i32 @test.ult(ptr readonly %src, ptr readnone %min, ptr readnone %max) { 11 ; CHECK: check.0.max: 12 ; CHECK-NEXT: [[C_MAX_0:%.*]] = icmp ult ptr [[SRC]], [[MAX:%.*]] 18 ; CHECK: check.3.max: 19 ; CHECK-NEXT: [[C_3_MAX:%.*]] = icmp ult ptr [[ADD_PTR_I36]], [[MAX]] 25 ; CHECK: check.1.max: 31 ; CHECK: check.2.max: 42 br i1 %c.min.0, label %trap, label %check.0.max 47 check.0.max: 48 %c.max.0 = icmp ult ptr %src, %max [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/llvm/test/MC/AMDGPU/ |
H A D | mcexpr_amd.s | 19 // OBJDUMP-NEXT: 000000000000000f l *ABS* 0000000000000000 max 57 // ASM: .set max_expression_all, max(1, 2, five, 3, four) 61 // ASM: .set max_with_max_sym, max(max, 4, 3, 1, 2) 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) [all …]
|
/llvm-project/llvm/test/Transforms/AggressiveInstCombine/AArch64/ |
H A D | fptosisat.ll | 13 %max = call i64 @llvm.smax.i64(i64 %min, i64 -2147483648) 14 ret i64 %max 21 ; CHECK-NEXT: [[MAX:%.*]] = call i64 @llvm.smax.i64(i64 [[MIN]], i64 -1073741824) 22 ; CHECK-NEXT: ret i64 [[MAX]] 26 %max = call i64 @llvm.smax.i64(i64 %min, i64 -1073741824) 27 ret i64 %max 34 ; CHECK-NEXT: [[MAX:%.*]] = call i32 @llvm.smax.i32(i32 [[MIN]], i32 -32768) 35 ; CHECK-NEXT: ret i32 [[MAX]] 39 %max = call i32 @llvm.smax.i32(i32 %min, i32 -32768) 40 ret i32 %max [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 …]
|
/llvm-project/lld/test/wasm/ |
H A D | import-memory.test | 19 # RUN: --max-memory=327680 -o %t.max.wasm %t.start.o 20 # RUN: obj2yaml %t.max.wasm | FileCheck -check-prefix=CHECK-MAX %s 22 # Verify the --initial-memory and --max-memory arguments work with imports 24 # CHECK-MAX: - Type: IMPORT 25 # CHECK-MAX-NEXT: Imports: 26 # CHECK-MAX-NEXT: - Module: env 27 # CHECK-MAX-NEXT: Field: memory 28 # CHECK-MAX-NEXT: Kind: MEMORY 29 # CHECK-MAX-NEXT: Memory: 30 # CHECK-MAX-NEXT: Flags: [ HAS_MAX ] [all …]
|
/llvm-project/libcxx/test/std/time/time.traits/time.traits.duration_values/ |
H A D | max.pass.cpp | 11 // duration_values::max // noexcept after C++17 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() [all …]
|