RFR: 8328865: [c2] No need to convert "(x+1)+y" into "(x+y)+1" when y is a CallNode [v2]

SUN Guoyun duke at openjdk.org
Wed Mar 27 09:22:22 UTC 2024


On Tue, 26 Mar 2024 16:34:34 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

> I think it is not a call node but (x+1) result is used by debug info of call node. For example, next code could be the same issue (I did not verified it):
> 
> ```
>      static int y = 0;
> ...
>      int foo(int x, int z) {
>          int a = x + 1;
>          y = a;
>          return a + z;
>      }
> ```

Your example is correct and has the same issue. I will make further modifications.

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

PR Comment: https://git.openjdk.org/jdk/pull/18482#issuecomment-2022285362


More information about the hotspot-compiler-dev mailing list