8280457: Duplicate implementation of dprecision_rounding and dstore_rounding
Reviewed-by: vlivanov, shade
This commit is contained in:
parent
d1569111d7
commit
0567a84d49
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2022, 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
|
||||
@ -96,7 +96,7 @@ Node* BarrierSetC2::store_at_resolved(C2Access& access, C2AccessValue& val) cons
|
||||
|
||||
GraphKit* kit = parse_access.kit();
|
||||
if (access.type() == T_DOUBLE) {
|
||||
Node* new_val = kit->dstore_rounding(val.node());
|
||||
Node* new_val = kit->dprecision_rounding(val.node());
|
||||
val.set_node(new_val);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2022, 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
|
||||
@ -2350,9 +2350,9 @@ void GraphKit::round_double_arguments(ciMethod* dest_method) {
|
||||
const Type *targ = tf->domain()->field_at(j + TypeFunc::Parms);
|
||||
if (targ->basic_type() == T_DOUBLE) {
|
||||
// If any parameters are doubles, they must be rounded before
|
||||
// the call, dstore_rounding does gvn.transform
|
||||
// the call, dprecision_rounding does gvn.transform
|
||||
Node *arg = argument(j);
|
||||
arg = dstore_rounding(arg);
|
||||
arg = dprecision_rounding(arg);
|
||||
set_argument(j, arg);
|
||||
}
|
||||
}
|
||||
@ -2387,20 +2387,6 @@ Node* GraphKit::dprecision_rounding(Node *n) {
|
||||
return n;
|
||||
}
|
||||
|
||||
// rounding for non-strict double stores
|
||||
Node* GraphKit::dstore_rounding(Node* n) {
|
||||
if (Matcher::strict_fp_requires_explicit_rounding) {
|
||||
#ifdef IA32
|
||||
if (UseSSE < 2) {
|
||||
return _gvn.transform(new RoundDoubleNode(0, n));
|
||||
}
|
||||
#else
|
||||
Unimplemented();
|
||||
#endif // IA32
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
// Generate a fast path/slow path idiom. Graph looks like:
|
||||
// [foo] indicates that 'foo' is a parameter
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2022, 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
|
||||
@ -790,9 +790,6 @@ class GraphKit : public Phase {
|
||||
// rounding for strict double precision conformance
|
||||
Node* dprecision_rounding(Node* n);
|
||||
|
||||
// rounding for non-strict double stores
|
||||
Node* dstore_rounding(Node* n);
|
||||
|
||||
// Helper functions for fast/slow path codes
|
||||
Node* opt_iff(Node* region, Node* iff);
|
||||
Node* make_runtime_call(int flags,
|
||||
|
@ -2004,19 +2004,19 @@ void Parse::do_one_bytecode() {
|
||||
|
||||
// double stores
|
||||
case Bytecodes::_dstore_0:
|
||||
set_pair_local( 0, dstore_rounding(pop_pair()) );
|
||||
set_pair_local( 0, dprecision_rounding(pop_pair()) );
|
||||
break;
|
||||
case Bytecodes::_dstore_1:
|
||||
set_pair_local( 1, dstore_rounding(pop_pair()) );
|
||||
set_pair_local( 1, dprecision_rounding(pop_pair()) );
|
||||
break;
|
||||
case Bytecodes::_dstore_2:
|
||||
set_pair_local( 2, dstore_rounding(pop_pair()) );
|
||||
set_pair_local( 2, dprecision_rounding(pop_pair()) );
|
||||
break;
|
||||
case Bytecodes::_dstore_3:
|
||||
set_pair_local( 3, dstore_rounding(pop_pair()) );
|
||||
set_pair_local( 3, dprecision_rounding(pop_pair()) );
|
||||
break;
|
||||
case Bytecodes::_dstore:
|
||||
set_pair_local( iter().get_index(), dstore_rounding(pop_pair()) );
|
||||
set_pair_local( iter().get_index(), dprecision_rounding(pop_pair()) );
|
||||
break;
|
||||
|
||||
case Bytecodes::_pop: dec_sp(1); break;
|
||||
|
Loading…
Reference in New Issue
Block a user