RFR: 8270366: C2: Add associative rule to add/sub node
Zhengyu Gu
zgu at openjdk.java.net
Wed Jul 14 14:04:45 UTC 2021
On Wed, 14 Jul 2021 14:01:19 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:
> Hi Zhengyu,
>
> It looks like you are missing a case for both long and int. Your code looks for these patterns:
>
> ```
> a*b+a*c --> a*(b+c)
> a*b+b*c --> b*(a+c)
> a*c+b*c --> (a+b)*c
> ```
>
> So you are not transforming this this case
>
> ```
> a*b+c*a -> a*(b+c)
> ```
Thanks, Andrew.
Updated.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4765
More information about the hotspot-compiler-dev
mailing list