Skip to content
Permalink
Browse files
8266388: C2: Improve constant ShiftCntV on x86
Reviewed-by: kvn
  • Loading branch information
Vladimir Ivanov committed May 3, 2021
1 parent 05cfac9 commit b42d4969b1753e717a66218fd465243dfeccd455
Showing with 6 additions and 2 deletions.
  1. +4 −0 src/hotspot/cpu/x86/x86.ad
  2. +1 −1 src/hotspot/share/opto/matcher.cpp
  3. +1 −1 src/hotspot/share/opto/matcher.hpp
@@ -2119,6 +2119,10 @@ bool Matcher::pd_clone_node(Node* n, Node* m, Matcher::MStack& mstack) {
mstack.push(m, Visit);
return true;
}
if (is_vshift_con_pattern(n, m)) { // ShiftV src (ShiftCntV con)
mstack.push(m, Visit); // m = ShiftCntV
return true;
}
return false;
}

@@ -2025,7 +2025,7 @@ OptoReg::Name Matcher::find_receiver() {
return OptoReg::as_OptoReg(regs.first());
}

bool Matcher::is_vshift_con_pattern(Node *n, Node *m) {
bool Matcher::is_vshift_con_pattern(Node* n, Node* m) {
if (n != NULL && m != NULL) {
return VectorNode::is_vector_shift(n) &&
VectorNode::is_vector_shift_count(m) && m->in(1)->is_Con();
@@ -121,7 +121,7 @@ class Matcher : public PhaseTransform {
bool find_shared_visit(MStack& mstack, Node* n, uint opcode, bool& mem_op, int& mem_addr_idx);
void find_shared_post_visit(Node* n, uint opcode);

bool is_vshift_con_pattern(Node *n, Node *m);
bool is_vshift_con_pattern(Node* n, Node* m);

// Debug and profile information for nodes in old space:
GrowableArray<Node_Notes*>* _old_node_note_array;

0 comments on commit b42d496

Please sign in to comment.