RFR: 8347481: C2: Remove the control input of some nodes
Vladimir Kozlov
kvn at openjdk.org
Thu Jan 16 15:55:53 UTC 2025
On Thu, 16 Jan 2025 02:54:30 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:
>> @iwanowww A cmov is as cheap as an add so I don't think there will be any performance effect. I believe what you mean by cmov being expensive is that it has 1 cycle of latency on both of its inputs, while a well-predicted if diamond has 0 cycle of latency on the chosen input only.
>
> Right, my memory failed me. Indeed I was referring to *relative* slowness of cmov instructions compared to well-predicted conditional jumps which is not relevant here.
> As a result, I don't think the control input of CMoveP and CMoveN is necessary and can be safely removed.
Okay. Let test it in JDK 25 and see how it goes. We have time to fix it if we find something wrong.
@dafedafe ran tier1-5 our testing and I don't see any new failures.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23055#discussion_r1918798922
More information about the hotspot-compiler-dev
mailing list