diff --git a/src/hotspot/share/opto/vectorIntrinsics.cpp b/src/hotspot/share/opto/vectorIntrinsics.cpp index c4a99ed8f6d..7e52e1ebc51 100644 --- a/src/hotspot/share/opto/vectorIntrinsics.cpp +++ b/src/hotspot/share/opto/vectorIntrinsics.cpp @@ -1813,7 +1813,7 @@ bool LibraryCallKit::inline_vector_insert() { default: fatal("%s", type2name(elem_bt)); break; } - Node* operation = gvn().transform(VectorInsertNode::make(opd, insert_val, idx->get_con())); + Node* operation = gvn().transform(VectorInsertNode::make(opd, insert_val, idx->get_con(), gvn())); Node* vbox = box_vector(operation, vbox_type, elem_bt, num_elem); set_result(vbox); diff --git a/src/hotspot/share/opto/vectornode.cpp b/src/hotspot/share/opto/vectornode.cpp index b9ef5abd75a..bd4b2b10fe2 100644 --- a/src/hotspot/share/opto/vectornode.cpp +++ b/src/hotspot/share/opto/vectornode.cpp @@ -1252,9 +1252,9 @@ Node* VectorReinterpretNode::Identity(PhaseGVN *phase) { return this; } -Node* VectorInsertNode::make(Node* vec, Node* new_val, int position) { +Node* VectorInsertNode::make(Node* vec, Node* new_val, int position, PhaseGVN& gvn) { assert(position < (int)vec->bottom_type()->is_vect()->length(), "pos in range"); - ConINode* pos = ConINode::make(position); + ConINode* pos = gvn.intcon(position); return new VectorInsertNode(vec, new_val, pos, vec->bottom_type()->is_vect()); } diff --git a/src/hotspot/share/opto/vectornode.hpp b/src/hotspot/share/opto/vectornode.hpp index ccb5fd88bf6..d1d30f36ac2 100644 --- a/src/hotspot/share/opto/vectornode.hpp +++ b/src/hotspot/share/opto/vectornode.hpp @@ -1398,7 +1398,7 @@ class VectorInsertNode : public VectorNode { virtual int Opcode() const; uint pos() const { return in(3)->get_int(); } - static Node* make(Node* vec, Node* new_val, int position); + static Node* make(Node* vec, Node* new_val, int position, PhaseGVN& gvn); }; class VectorBoxNode : public Node {