Skip to content

Commit

Permalink
8330106: C2: VectorInsertNode::make() shouldn't call ConINode::make()…
Browse files Browse the repository at this point in the history
… directly

Reviewed-by: kvn, thartmann
  • Loading branch information
rwestrel committed Apr 12, 2024
1 parent e45fea5 commit bde3fc0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/hotspot/share/opto/vectorIntrinsics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2696,7 +2696,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);
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/opto/vectornode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1676,9 +1676,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());
}

Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/opto/vectornode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1688,7 +1688,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 {
Expand Down

1 comment on commit bde3fc0

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.