Skip to content
Permalink
Browse files
8254814: [Vector API] Fix an AVX512 crash after JDK-8223347
Reviewed-by: vlivanov, thartmann, psandoz
  • Loading branch information
DamonFool committed Oct 16, 2020
1 parent 7c0d417 commit 3d23bd8e5b54ee57664b0e793ebafd2e073f1c8e
Showing with 2 additions and 22 deletions.
  1. +2 −22 src/hotspot/cpu/x86/x86.ad
@@ -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));

1 comment on commit 3d23bd8

@bridgekeeper

This comment has been minimized.

Copy link

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

Please sign in to comment.