remove always tautological checked_casts

This commit is contained in:
Kim Barrett 2026-03-25 17:11:25 +00:00
parent 7e4ac140d9
commit c7eff7fd6f
3 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -112,7 +112,7 @@ public:
void write_on(CompressedWriteStream* stream) {
stream->write_int(value());
if(is_callee_saved() || is_derived_oop()) {
stream->write_int(checked_cast<int>(content_reg()->value()));
stream->write_int(content_reg()->value());
}
}

View File

@ -1458,7 +1458,7 @@ static void split_regions_for_worker(size_t start, size_t end,
size_t remainder = num_regions % num_workers;
// The first few workers will get one extra.
*worker_start = start + worker_id * num_regions_per_worker
+ MIN2(checked_cast<size_t>(worker_id), remainder);
+ MIN2<size_t>(worker_id, remainder);
*worker_end = *worker_start + num_regions_per_worker
+ (worker_id < remainder ? 1 : 0);
}

View File

@ -1506,7 +1506,7 @@ void PhaseIdealLoop::transform_long_range_checks(int stride_con, const Node_List
Node* long_zero = longcon(0);
Node* int_zero = intcon(0);
Node* long_one = longcon(1);
Node* int_stride = intcon(checked_cast<int>(stride_con));
Node* int_stride = intcon(stride_con);
for (uint i = 0; i < range_checks.size(); i++) {
ProjNode* proj = range_checks.at(i)->as_Proj();