--- a/src/hotspot/share/opto/subnode.hpp Thu Apr 26 15:41:48 2018 +0200
+++ b/src/hotspot/share/opto/subnode.hpp Fri Apr 27 07:59:29 2018 +0200
@@ -448,7 +448,12 @@
public:
SqrtFNode(Compile* C, Node *c, Node *in1) : Node(c, in1) {
init_flags(Flag_is_expensive);
- C->add_expensive_node(this);
+ if (c != NULL) {
+ // Treat node only as expensive if a control input is set because it might
+ // be created from a SqrtDNode in ConvD2FNode::Ideal() that was found to
+ // be unique and therefore has no control input.
+ C->add_expensive_node(this);
+ }
}
virtual int Opcode() const;
const Type *bottom_type() const { return Type::FLOAT; }