openjdk / panama-vector Public
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8266775: Add VectorLoadConst node implementation for Arm SVE #79
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
@@ -220,9 +220,9 @@ source %{ | ||
// Others | ||
case Op_ExtractC: | ||
case Op_ExtractUB: | ||
// Vector API specific | ||
case Op_VectorLoadConst: | ||
return false; | ||
// Vector API specific | ||
case Op_LoadVectorGather: | ||
case Op_StoreVectorScatter: | ||
// Currently the implementation for partial vectors are not implemented yet. | ||
// Will add them in a separate patch. | ||
@@ -2491,3 +2491,18 @@ instruct scatterL(vmemA mem, vReg src, vReg idx) %{ | ||
%} | ||
ins_pipe(pipe_slow); | ||
%} | ||
|
||
// ------------------------------ Vector Load Const ------------------------------- | ||
instruct loadconB(vReg dst, immI0 src) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a blank line between them? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure. |
||
%{ | ||
predicate(UseSVE > 0 && | ||
n->bottom_type()->is_vect()->element_basic_type() == T_BYTE); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When the size is 16, the neon pattern will also be matched. Can you please add "UseSVE == 0" for NEON VectorLoadConst patterns? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for your review. I have changed that. |
||
match(Set dst (VectorLoadConst src)); | ||
ins_cost(INSN_COST + SVE_COST); | ||
format %{ "sve_ld1b $dst, CONSTANT_MEMORY\t# load iota indices" %} | ||
ins_encode %{ | ||
__ lea(rscratch1, ExternalAddress(StubRoutines::aarch64::vector_iota_indices())); | ||
__ sve_ld1b(as_FloatRegister($dst$$reg), __ B, ptrue, Address(rscratch1, 0)); | ||
%} | ||
ins_pipe(pipe_slow); | ||
%} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could it use
INDEX <Zd>.<T>, #<imm1>, #<imm2>
(Create index starting from and incremented by immediate) here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great suggestion. I will change that. Thank you.