Skip to content
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

Simplify SupportsConst(I|L)Div to Supports(I|L)MulHigh #7082

Merged
merged 2 commits into from
Aug 10, 2023

Conversation

jmesyou
Copy link
Contributor

@jmesyou jmesyou commented Jul 31, 2023

This commit is motivated by eclipse-openj9/openj9#17861.
A check whether the underlying target supports 64 bit multiplication returning the high word is needed
in order to intrinsify java.lang.Math.multiplyHigh

As a side effect, this has simplified the
SupportsConst(I|L)Div checks as they are transitive to the newly added checks

This is commit is motivated by openj9#17861.
A check whether the underlying target supports 64 bit
multiplication returning the high word is needed
in order to intrinsify java.lang.Math.multiplyHigh

As a side effect, this has simplified the
SupportsConst(I|L)Div checks as they are transitive
to the newly added checks

Signed-off-by: James You <james.you@protonmail.com>
@knn-k
Copy link
Contributor

knn-k commented Jul 31, 2023

Please change the aarch64 code, too.
32-bit arm and aarch64 don't share code generator code.

jmesyou added a commit to jmesyou/openj9 that referenced this pull request Aug 1, 2023
See eclipse-omr/omr#7082

Depends on: eclipse-omr/omr#7082

Signed-off-by: James You <james.you@protonmail.com>
Previously, the multiply high feature flag was not enabled
for aarch64. This change sets the flag and enables the
fast constant division optimization.

Signed-off-by: James You <james.you@protonmail.com>
@jmesyou
Copy link
Contributor Author

jmesyou commented Aug 1, 2023

@knn-k The aarch64 code gen did not originally set the SupportsConstIDiv flag, so I've added the new flag as part of an additional commit.

@knn-k
Copy link
Contributor

knn-k commented Aug 4, 2023

Is there any reason for not setting the flag for IMulHigh on aarch64? I have the same question for LMulHigh on p.

  • aarch64: LMulHigh (codegen has imulhEvaluator)
  • arm: IMulHigh
  • p: IMulHigh (codegen has lmulhEvaluator)
  • x86-32: IMulHigh
  • x86-64: IMulHigh and LMulHigh
  • z: IMulHigh

@jmesyou
Copy link
Contributor Author

jmesyou commented Aug 4, 2023

I see no reason that it shouldn't be set. I did not set them because those code gens did not originally set the SupportsConstIDiv flag (or vice versa) so that may have been previous oversight. I can push a new change which sets the missing flags for arm64 and power.

@knn-k
Copy link
Contributor

knn-k commented Aug 7, 2023

Other reviewers, any comments?

@knn-k
Copy link
Contributor

knn-k commented Aug 10, 2023

Jenkins build all,amac

@knn-k
Copy link
Contributor

knn-k commented Aug 10, 2023

Jenkins build win

@knn-k
Copy link
Contributor

knn-k commented Aug 10, 2023

Jenkins build zlinux

@knn-k knn-k self-assigned this Aug 10, 2023
@knn-k knn-k merged commit d292034 into eclipse-omr:master Aug 10, 2023
5 checks passed
@knn-k
Copy link
Contributor

knn-k commented Aug 10, 2023

It didn't notice that I had to perform a coordinated merge with eclipse-openj9/openj9#17892.
I opened #7085 to revert this.

@knn-k
Copy link
Contributor

knn-k commented Aug 10, 2023

@jmesyou My apologies. Please open a new pull request after #7085 is merged.

@jmesyou
Copy link
Contributor Author

jmesyou commented Aug 22, 2023

Reopened in #7095

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants