RFR: 8282204: Use lea instructions for arithmetic operations on x86_64 [v8]
Jie Fu
jiefu at openjdk.java.net
Fri Mar 4 05:18:03 UTC 2022
On Thu, 3 Mar 2022 00:30:54 GMT, Quan Anh Mai <duke at openjdk.java.net> wrote:
>> Hi,
>>
>> This patch adds several matching rules for x86_64 backend to use `lea` instructions for several fused arithmetic operations. Also, `lea`s don't kill flags and allow different `dst` and `src`, so it is preferred over `sll` if possible, too.
>>
>> Thank you very much.
>
> Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:
>
> address reviews
Maybe you have also noticed that the gcc will also generate `lea` for this method with -O{1, 2, 3}.
int test(int d) {
return d + 5;
}
So why not also enable it for Java?
-------------
PR: https://git.openjdk.java.net/jdk/pull/7560
More information about the hotspot-compiler-dev
mailing list