Skip to content

Commit 14f23a5

Browse files
committed
max -> min
1 parent fb9a6fa commit 14f23a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Driver/ToolChains/AMDGPU.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ static unsigned GetFullLTOPartitions(const Driver &D, const ArgList &Args) {
718718
// at 16 partitions. More than 16 partitions rarely benefits code splitting
719719
// and can lead to more empty/small modules each with their own overhead.
720720
if (!A)
721-
return std::max(16u, llvm::hardware_concurrency().compute_thread_count());
721+
return std::min(16u, llvm::hardware_concurrency().compute_thread_count());
722722
int Value;
723723
if (StringRef(A->getValue()).getAsInteger(10, Value) || (Value < 1)) {
724724
D.Diag(diag::err_drv_invalid_int_value)

0 commit comments

Comments
 (0)