On Wed, 11 Nov 2026 09:01:58 GMT, Emanuel Peter <[email protected]> wrote:

>> The test failure on Windows is unrelated to this PR, it's about installing 
>> MSYS2 on ARM64.
>
> @erifan Thanks for the explanations. I see that sharing code between scalar 
> and vector optimizations could be very interesting.
> 
> The question is about the concrete design, naming etc. This discussion goes 
> beyond what the PR description mentions, and would warrant careful 
> consideration/prototyping/review. Unfortunately, I'm currently focused on 
> JDK28 bugs (fixes and reviews). Can you delay this issue to JDK29, when we 
> may have some more cycles to review such RFEs?
> 
> I would also like to hear @iwanowww @chhagedorn or other more senior 
> engineers on this issue.
> 
> One thought I just had: Could we split the additional optimization and the 
> "generic optimization framework" into two RFE's? You can still implement your 
> vector optimization in a generic way, but restricted to vector files. And 
> then in a second step do the refactoring, where you demonstrate how we can 
> use your "generic optimization framework" for both scalar and vector 
> optimizations. That would allow us to discuss the naming and design in a 
> proper way, where we can see the final result. An alternative would be to 
> find existing scalar and vector optimizations where you can already 
> demonstrate the "generic optimization framework", and then add your new 
> optimizations in a second RFE. What do you think?

Hi @eme64,

To make the `GenericOpts` framework more concrete with multiple use cases, I 
put together two draft patches on top of this PR:

1. 
https://github.com/openjdk/jdk/commit/07ec3a300cb0c7dc9cb8362c60e5f6fc2fb92e75
   Extends `(A & B) ^ B -> ~A & B` to scalar `INT` and `LONG` types.

2. 
https://github.com/openjdk/jdk/commit/f96fc37712d23ccfd76b11446c0eb923a879416f
   Refactors the existing scalar `(A + B) - B -> A` optimization into this 
framework and extends it to unpredicated integral  vector types.

Both commits are just prototypes for demonstrating the design and are not meant 
to be merged as-is. Let me know if these help clarify how `GenericOpts` is 
intended to be used, and what you think.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/32095#issuecomment-6850750377

Reply via email to