--- a/src/hotspot/share/opto/convertnode.cpp Thu Sep 26 13:51:43 2019 +0200
+++ b/src/hotspot/share/opto/convertnode.cpp Tue Oct 01 11:43:10 2019 +0200
@@ -531,4 +531,16 @@
return phase->type( in(1) );
}
-
+//=============================================================================
+//------------------------------Identity---------------------------------------
+// Remove redundant roundings.
+Node* RoundDoubleModeNode::Identity(PhaseGVN* phase) {
+ int op = in(1)->Opcode();
+ // Redundant rounding e.g. floor(ceil(n)) -> ceil(n)
+ if(op == Op_RoundDoubleMode) return in(1);
+ return this;
+}
+const Type* RoundDoubleModeNode::Value(PhaseGVN* phase) const {
+ return Type::DOUBLE;
+}
+//=============================================================================