Skip to content

Commit

Permalink
8254814: [Vector API] Fix an AVX512 crash after JDK-8223347
Browse files Browse the repository at this point in the history
Reviewed-by: vlivanov, thartmann, psandoz
  • Loading branch information
DamonFool committed Oct 16, 2020
1 parent 7c0d417 commit 3d23bd8
Showing 1 changed file with 2 additions and 22 deletions.
24 changes: 2 additions & 22 deletions src/hotspot/cpu/x86/x86.ad
Expand Up @@ -4640,29 +4640,9 @@ instruct reduction64B(rRegI dst, rRegI src1, legVec src2, legVec vtmp1, legVec v

// =======================Short Reduction==========================================

instruct reductionS(rRegI dst, rRegI src1, vec src2, vec vtmp1, vec vtmp2) %{
instruct reductionS(rRegI dst, rRegI src1, legVec src2, legVec vtmp1, legVec vtmp2) %{
predicate(vector_element_basic_type(n->in(2)) == T_SHORT &&
vector_length(n->in(2)) <= 16); // src2
match(Set dst (AddReductionVI src1 src2));
match(Set dst (MulReductionVI src1 src2));
match(Set dst (AndReductionV src1 src2));
match(Set dst ( OrReductionV src1 src2));
match(Set dst (XorReductionV src1 src2));
match(Set dst (MinReductionV src1 src2));
match(Set dst (MaxReductionV src1 src2));
effect(TEMP vtmp1, TEMP vtmp2);
format %{ "vector_reduction_short $dst,$src1,$src2 ; using $vtmp1, $vtmp2 as TEMP" %}
ins_encode %{
int opcode = this->ideal_Opcode();
int vlen = vector_length(this, $src2);
__ reduceS(opcode, vlen, $dst$$Register, $src1$$Register, $src2$$XMMRegister, $vtmp1$$XMMRegister, $vtmp2$$XMMRegister);
%}
ins_pipe( pipe_slow );
%}

instruct reduction32S(rRegI dst, rRegI src1, legVec src2, legVec vtmp1, legVec vtmp2) %{
predicate(vector_element_basic_type(n->in(2)) == T_SHORT &&
vector_length(n->in(2)) == 32); // src2
vector_length(n->in(2)) <= 32); // src2
match(Set dst (AddReductionVI src1 src2));
match(Set dst (MulReductionVI src1 src2));
match(Set dst (AndReductionV src1 src2));
Expand Down

1 comment on commit 3d23bd8

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented on 3d23bd8 Oct 16, 2020

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.