Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
86350bb
initial commit
May 20, 2025
58a7f7a
disable cmovei/l => vectorblend
May 21, 2025
e967fea
split from pr 25341
May 22, 2025
e27247b
initial commit
Sep 12, 2025
4a75e87
Merge branch 'openjdk:master' into master
Hamlin-Li Sep 12, 2025
4ee1df1
Merge branch 'openjdk:master' into master
Hamlin-Li Sep 15, 2025
0ff5e42
Merge branch 'openjdk:master' into master
Hamlin-Li Sep 18, 2025
924c4c9
Merge branch 'openjdk:master' into master
Hamlin-Li Sep 22, 2025
75dee02
Merge branch 'openjdk:master' into master
Hamlin-Li Sep 25, 2025
57973f4
Merge branch 'openjdk:master' into master
Hamlin-Li Sep 25, 2025
4b058ce
Merge branch 'openjdk:master' into master
Hamlin-Li Sep 29, 2025
b73a502
Merge branch 'openjdk:master' into master
Hamlin-Li Sep 30, 2025
8eba0c0
Merge branch 'openjdk:master' into master
Hamlin-Li Oct 1, 2025
7f36f23
Merge branch 'openjdk:master' into master
Hamlin-Li Oct 13, 2025
3089ec9
Merge branch 'openjdk:master' into master
Hamlin-Li Oct 14, 2025
2238d76
Merge branch 'openjdk:master' into master
Hamlin-Li Oct 16, 2025
c0358cf
Merge branch 'openjdk:master' into master
Hamlin-Li Oct 20, 2025
f54562f
Merge branch 'openjdk:master' into master
Hamlin-Li Oct 29, 2025
6635678
Merge branch 'openjdk:master' into master
Hamlin-Li Nov 3, 2025
bd5599b
Merge branch 'master' into vectorize-CMove-Bool
Nov 3, 2025
2ba466b
disable riscv
Nov 4, 2025
2a0e1ad
disable Op_CMoveI/Op_CMoveL in VectorNode::opcode
Nov 4, 2025
9e5f137
revert supports_transform_cmove_to_vectorblend for all cpus
Nov 4, 2025
736425c
Merge branch 'openjdk:master' into master
Hamlin-Li Nov 4, 2025
bc0c9b3
fix JDK-8371297: assert in BoolTest
Nov 4, 2025
5b85c74
fix code path change in VectorNode::implemented
Nov 5, 2025
81996cf
simplify
Nov 5, 2025
56b6e02
comments
Nov 5, 2025
cfbe0a6
Update src/hotspot/share/opto/superword.cpp
Hamlin-Li Nov 11, 2025
a89d26c
fix typo
Nov 11, 2025
a336b52
Merge branch 'openjdk:master' into master
Hamlin-Li Nov 11, 2025
8e84017
Merge branch 'master' into vectorize-CMove-Bool
Nov 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/hotspot/cpu/aarch64/matcher_aarch64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,9 @@
static bool is_feat_fp16_supported() {
return (VM_Version::supports_fphp() && VM_Version::supports_asimdhp());
}

static bool supports_vector_different_use_def_size() {
Copy link
Contributor

Choose a reason for hiding this comment

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

This sounds extremely vague. Is this supposed to only be about CMove? Because we already have all sorts of instructions that allow different use and def types, such as conversion vectors. Those are already in use on aarch64 and x64.

return false;
}

#endif // CPU_AARCH64_MATCHER_AARCH64_HPP
4 changes: 4 additions & 0 deletions src/hotspot/cpu/arm/matcher_arm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,4 +193,8 @@
return false;
}

static bool supports_vector_different_use_def_size() {
return false;
}

#endif // CPU_ARM_MATCHER_ARM_HPP
4 changes: 4 additions & 0 deletions src/hotspot/cpu/ppc/matcher_ppc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,4 +203,8 @@
return false;
}

static bool supports_vector_different_use_def_size() {
return false;
}

#endif // CPU_PPC_MATCHER_PPC_HPP
4 changes: 4 additions & 0 deletions src/hotspot/cpu/riscv/matcher_riscv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,4 +199,8 @@
return false;
}

static bool supports_vector_different_use_def_size() {
return false;
}

#endif // CPU_RISCV_MATCHER_RISCV_HPP
4 changes: 4 additions & 0 deletions src/hotspot/cpu/s390/matcher_s390.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,4 +196,8 @@
return false;
}

static bool supports_vector_different_use_def_size() {
return false;
}

#endif // CPU_S390_MATCHER_S390_HPP
4 changes: 4 additions & 0 deletions src/hotspot/cpu/x86/matcher_x86.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,4 +236,8 @@
}
}

static bool supports_vector_different_use_def_size() {
return false;
}

#endif // CPU_X86_MATCHER_X86_HPP
13 changes: 11 additions & 2 deletions src/hotspot/share/opto/superword.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2307,8 +2307,17 @@ bool SuperWord::is_velt_basic_type_compatible_use_def(Node* use, Node* def) cons
type2aelembytes(use_bt) == 4;
}

// Default case: input size of use equals output size of def.
return type2aelembytes(use_bt) == type2aelembytes(def_bt);
// Input size of use equals output size of def
if (type2aelembytes(use_bt) == type2aelembytes(def_bt)) {
return true;
}

// Allow CMove to have different type for comparision and moving.
if (VectorNode::is_different_use_def_size_supported() && use->is_CMove() && def->is_Bool()) {
return true;
}

return false;
}

// Return nullptr if success, else failure message
Expand Down
5 changes: 5 additions & 0 deletions src/hotspot/share/opto/vectornode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,10 @@ bool VectorNode::is_populate_index_supported(BasicType bt) {
return Matcher::match_rule_supported_vector(Op_PopulateIndex, vlen, bt);
}

bool VectorNode::is_different_use_def_size_supported() {
return Matcher::supports_vector_different_use_def_size();
}
Comment on lines +409 to +411
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this only a forwarding? What's the point of this?


bool VectorNode::is_shift_opcode(int opc) {
switch (opc) {
case Op_LShiftI:
Expand Down Expand Up @@ -2302,6 +2306,7 @@ Node* VectorBlendNode::Identity(PhaseGVN* phase) {
}
return this;
}

static bool is_replicate_uint_constant(const Node* n) {
return n->Opcode() == Op_Replicate &&
n->in(1)->is_Con() &&
Expand Down
3 changes: 3 additions & 0 deletions src/hotspot/share/opto/vectornode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ class VectorNode : public TypeNode {
static bool is_vector_rotate_supported(int opc, uint vlen, BasicType bt);
static bool is_vector_integral_negate_supported(int opc, uint vlen, BasicType bt, bool use_predicate);
static bool is_populate_index_supported(BasicType bt);
// Return true if every bit in this vector is 1, e.g. based on the comparison
// result of 2 floats, set a double result.
static bool is_different_use_def_size_supported();
Comment on lines +113 to +115
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm a bit confused about your description here. It sounds like this method is looking at a specific vector, and returns results based on that. But that's not what's happening here, is it?

// Return true if every bit in this vector is 1.
static bool is_all_ones_vector(Node* n);
// Return true if every bit in this vector is 0.
Expand Down