mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-23 16:55:09 +00:00
8276105: C2: Conv(D|F)2(I|L)Nodes::Ideal should handle rounding correctly
Reviewed-by: kvn, thartmann
This commit is contained in:
parent
acceffcbf7
commit
0488ebdf14
@ -108,8 +108,10 @@ const Type* ConvD2INode::Value(PhaseGVN* phase) const {
|
||||
//------------------------------Ideal------------------------------------------
|
||||
// If converting to an int type, skip any rounding nodes
|
||||
Node *ConvD2INode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
||||
if( in(1)->Opcode() == Op_RoundDouble )
|
||||
set_req(1,in(1)->in(1));
|
||||
if (in(1)->Opcode() == Op_RoundDouble) {
|
||||
set_req(1, in(1)->in(1));
|
||||
return this;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -142,8 +144,10 @@ Node* ConvD2LNode::Identity(PhaseGVN* phase) {
|
||||
//------------------------------Ideal------------------------------------------
|
||||
// If converting to an int type, skip any rounding nodes
|
||||
Node *ConvD2LNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
||||
if( in(1)->Opcode() == Op_RoundDouble )
|
||||
set_req(1,in(1)->in(1));
|
||||
if (in(1)->Opcode() == Op_RoundDouble) {
|
||||
set_req(1, in(1)->in(1));
|
||||
return this;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -179,8 +183,10 @@ Node* ConvF2INode::Identity(PhaseGVN* phase) {
|
||||
//------------------------------Ideal------------------------------------------
|
||||
// If converting to an int type, skip any rounding nodes
|
||||
Node *ConvF2INode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
||||
if( in(1)->Opcode() == Op_RoundFloat )
|
||||
set_req(1,in(1)->in(1));
|
||||
if (in(1)->Opcode() == Op_RoundFloat) {
|
||||
set_req(1, in(1)->in(1));
|
||||
return this;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -206,8 +212,10 @@ Node* ConvF2LNode::Identity(PhaseGVN* phase) {
|
||||
//------------------------------Ideal------------------------------------------
|
||||
// If converting to an int type, skip any rounding nodes
|
||||
Node *ConvF2LNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
||||
if( in(1)->Opcode() == Op_RoundFloat )
|
||||
set_req(1,in(1)->in(1));
|
||||
if (in(1)->Opcode() == Op_RoundFloat) {
|
||||
set_req(1, in(1)->in(1));
|
||||
return this;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user