-
Enhancement
-
Resolution: Fixed
-
P4
-
17, 19
-
b06
The following two gvn.transform calls seem to be redundant.
It would be better to remove them.
```
case Bytecodes::_l2f:
if (Matcher::convL2FSupported()) {
a = pop_pair();
b = _gvn.transform( new ConvL2FNode(a));
// For x86_32.ad, FILD doesn't restrict precision to 24 or 53 bits.
// Rather than storing the result into an FP register then pushing
// out to memory to round, the machine instruction that implements
// ConvL2D is responsible for rounding.
// c = precision_rounding(b);
c = _gvn.transform(b); <-------- redundant
push(c);
} else {
l2f();
}
break;
case Bytecodes::_l2d:
a = pop_pair();
b = _gvn.transform( new ConvL2DNode(a));
// For x86_32.ad, rounding is always necessary (see _l2f above).
// c = dprecision_rounding(b);
c = _gvn.transform(b); <------- redundant
push_pair(c);
break;
```
It would be better to remove them.
```
case Bytecodes::_l2f:
if (Matcher::convL2FSupported()) {
a = pop_pair();
b = _gvn.transform( new ConvL2FNode(a));
// For x86_32.ad, FILD doesn't restrict precision to 24 or 53 bits.
// Rather than storing the result into an FP register then pushing
// out to memory to round, the machine instruction that implements
// ConvL2D is responsible for rounding.
// c = precision_rounding(b);
c = _gvn.transform(b); <-------- redundant
push(c);
} else {
l2f();
}
break;
case Bytecodes::_l2d:
a = pop_pair();
b = _gvn.transform( new ConvL2DNode(a));
// For x86_32.ad, rounding is always necessary (see _l2f above).
// c = dprecision_rounding(b);
c = _gvn.transform(b); <------- redundant
push_pair(c);
break;
```