-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8367611: Enable vblendvp[sd] on Future ECore #27354
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
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back missa! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
@missa-prime The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
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.
Thank you for this improvement, @missa-prime! The change looks good to me, but I have a question.
The JTREG test shown below was used to verify correctness against the OpenJDK v26-b15 baseline build.
- jtreg:test/hotspot/jtreg/compiler/intrinsics/math/TestSignumIntrinsic.java
Can you elaborate, what this verification entails? Why this test?
@mhaessig I used this test because it frequently calls vblendvps() and vblendvpd() in the macro assembler. On Darkmont and non-Darkmont cores, I checked the right code paths were followed with asserts. Also, I wrote some sample code and checked the instructions generated at runtime. |
@@ -2897,7 +2897,8 @@ void MacroAssembler::vbroadcastss(XMMRegister dst, AddressLiteral src, int vecto | |||
// vblendvps(XMMRegister dst, XMMRegister nds, XMMRegister src, XMMRegister mask, int vector_len, bool compute_mask = true, XMMRegister scratch = xnoreg) | |||
void MacroAssembler::vblendvps(XMMRegister dst, XMMRegister src1, XMMRegister src2, XMMRegister mask, int vector_len, bool compute_mask, XMMRegister scratch) { | |||
// WARN: Allow dst == (src1|src2), mask == scratch | |||
bool blend_emulation = EnableX86ECoreOpts && UseAVX > 1; | |||
bool use_blend_instr = VM_Version::is_intel_darkmont() && (dst == src1); |
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.
My only real comment is a nit-pick about the variable name.. use_blend_instr
implies a range of darkmont and above and 'EnableX86CoreOpts' and 'below'.. which is not the value of this variable (i.e. just darkmont and above). Perhaps blend_fixed
? blend_partly_fixed
? Or 'just' add it to the blend_emulation
...
bool blend_emulation = EnableX86ECoreOpts && UseAVX > 1
&& VM_Version::is_intel_darkmont() && (dst == src1); // partly fixed on Darkmont
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.
I added it to blend_emulation
as that seems to make the most sense.
The upcoming ECore platforms will benefit from using
vblendvps
andvblendvpd
instructions when the destination register is the same as the source register. This change takes that situation into account.The JTREG test shown below was used to verify correctness against the OpenJDK v26-b15 baseline build. This test frequently calls vblendvps() and vblendvpd() in the macro assembler. On Darkmont and non-Darkmont cores, the right code paths are followed when checking with asserts.
jtreg:test/hotspot/jtreg/compiler/intrinsics/math/TestSignumIntrinsic.java
Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/27354/head:pull/27354
$ git checkout pull/27354
Update a local copy of the PR:
$ git checkout pull/27354
$ git pull https://git.openjdk.org/jdk.git pull/27354/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 27354
View PR using the GUI difftool:
$ git pr show -t 27354
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/27354.diff
Using Webrev
Link to Webrev Comment