RFR: 8051725: Improve expansion of Conv2B nodes in the middle-end [v6]

Jasmine Karthikeyan jkarthikeyan at openjdk.org
Thu May 18 04:17:53 UTC 2023


On Fri, 28 Apr 2023 05:51:06 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

>> Jasmine Karthikeyan has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 11 commits:
>> 
>>  - Merge branch 'master' into conv2b-x86-lowering
>>  - Whitespace tweak
>>  - Make transform conditional
>>  - Remove Conv2B from backend as it's macro expanded now
>>  - Re-work transform to happen in macro expansion
>>  - Fix whitespace and add bug tag to IR test
>>  - Merge branch 'master' into conv2b-x86-lowering
>>  - Merge branch 'master' into conv2b-x86-lowering
>>  - Merge branch 'master' into conv2b-x86-lowering
>>  - Merge branch 'master' into conv2b-x86-lowering
>>  - ... and 1 more: https://git.openjdk.org/jdk/compare/bad6aa68...295b9a67
>
> src/hotspot/share/opto/addnode.cpp line 890:
> 
>> 888:   }
>> 889: 
>> 890:   // Try to convert (c ? 1 : 0) ^ 1 into !c ? 1 : 0. This pattern can occur after expansion of Conv2B nodes.
> 
> Be more general? `Xor (CMove cond, iftrue, iffalse), op == CMove cond, (Xor iftrue op), (Xor iffalse op)`. You can be conservative and apply this only if `op`, `iftrue` and `iffalse` are all constant.

I think that's a good idea, I've made this change. I wonder if other associative operations would also benefit from a similar patch?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13345#discussion_r1197338164


More information about the hotspot-compiler-dev mailing list