Skip to content

Commit bde3fc0

Browse files
committed
8330106: C2: VectorInsertNode::make() shouldn't call ConINode::make() directly
Reviewed-by: kvn, thartmann
1 parent e45fea5 commit bde3fc0

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/hotspot/share/opto/vectorIntrinsics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2696,7 +2696,7 @@ bool LibraryCallKit::inline_vector_insert() {
26962696
default: fatal("%s", type2name(elem_bt)); break;
26972697
}
26982698

2699-
Node* operation = gvn().transform(VectorInsertNode::make(opd, insert_val, idx->get_con()));
2699+
Node* operation = gvn().transform(VectorInsertNode::make(opd, insert_val, idx->get_con(), gvn()));
27002700

27012701
Node* vbox = box_vector(operation, vbox_type, elem_bt, num_elem);
27022702
set_result(vbox);

src/hotspot/share/opto/vectornode.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1676,9 +1676,9 @@ Node* VectorReinterpretNode::Identity(PhaseGVN *phase) {
16761676
return this;
16771677
}
16781678

1679-
Node* VectorInsertNode::make(Node* vec, Node* new_val, int position) {
1679+
Node* VectorInsertNode::make(Node* vec, Node* new_val, int position, PhaseGVN& gvn) {
16801680
assert(position < (int)vec->bottom_type()->is_vect()->length(), "pos in range");
1681-
ConINode* pos = ConINode::make(position);
1681+
ConINode* pos = gvn.intcon(position);
16821682
return new VectorInsertNode(vec, new_val, pos, vec->bottom_type()->is_vect());
16831683
}
16841684

src/hotspot/share/opto/vectornode.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1688,7 +1688,7 @@ class VectorInsertNode : public VectorNode {
16881688
virtual int Opcode() const;
16891689
uint pos() const { return in(3)->get_int(); }
16901690

1691-
static Node* make(Node* vec, Node* new_val, int position);
1691+
static Node* make(Node* vec, Node* new_val, int position, PhaseGVN& gvn);
16921692
};
16931693

16941694
class VectorBoxNode : public Node {

0 commit comments

Comments
 (0)