RFR: 8310190: C2 SuperWord: AlignVector is broken, generates misaligned packs [v21]

Emanuel Peter epeter at openjdk.org
Wed Dec 6 16:46:05 UTC 2023


On Mon, 4 Dec 2023 13:31:24 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> src/hotspot/share/opto/superword.cpp line 1720:
>> 
>>> 1718:   //        + offset              + offset                                  + C_const                   (sum of constant terms)
>>> 1719:   //        + invar               + invar_factor * var_invar                + C_invar * var_invar       (term for variable init)
>>> 1720:   //                          /   + scale * init                            + C_init  * var_init        (term for invariant)
>> 
>> You flipped the comments for the variable init and invariant terms
>
> `var_invar` is slightly confusing. Maybe we should flip it to `invar_var` to be consistent with `invar_factor`? Or maybe you find another name for that term. I could not come up with something better for now.

I really don't know anything better than `var_invar`. The idea is that there is both a constant `C` and variable `var` term for both the `init` and `invar` terms. I even explain that below, that there is a such a factorization into constant and variable.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14785#discussion_r1417647566


More information about the hotspot-compiler-dev mailing list