8287052: comparing double to max_intx gives unexpected results
Reviewed-by: kvn
This commit is contained in:
parent
7b274feba5
commit
ba23f14025
@ -131,11 +131,15 @@ intx CompilerConfig::scaled_compile_threshold(intx threshold, double scale) {
|
||||
} else {
|
||||
double v = threshold * scale;
|
||||
assert(v >= 0, "must be");
|
||||
if (v > max_intx) {
|
||||
if (g_isnan(v) || !g_isfinite(v)) {
|
||||
return max_intx;
|
||||
} else {
|
||||
return (intx)(v);
|
||||
}
|
||||
int exp;
|
||||
(void) frexp(v, &exp);
|
||||
if (exp > 63) {
|
||||
return max_intx;
|
||||
}
|
||||
return (intx)(v);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user