RFR: 8292675: Add identity transformation for removing redundant AndV/OrV nodes [v2]

Bhavana Kilambi bkilambi at openjdk.org
Thu Sep 8 16:28:34 UTC 2022


On Thu, 8 Sep 2022 11:59:14 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

>> Hi, thank you for your review comments. I will make the suggested changes and upload a new patch.
>> Regarding omitting this condition - `(OperationV src2 (OperationV src1 src2 m1) m1)` => This would result in a different result as compared to `(OperationV src1 src2 m1)`. So the inner `OperationV` would result in `src1` being copied for unmasked lanes and the outer `OperationV` would result in `src2` being copied to the final result for unmasked lanes and thus the results for both the operations is different. So for masked lanes, the result is `OperationV(src1, src2)` but it is not so for the unmasked lanes. So we need to have the first arguments of both `OperationV` to be same so that the unmasked lanes would then have the same value in the end and that can then be optimized to a single `OperationV` node.
>
> Right, I missed that. Would probably not hurt adding a corresponding comment. Thanks!

Thanks. I have added a comment for this case.

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

PR: https://git.openjdk.org/jdk/pull/10163


More information about the hotspot-compiler-dev mailing list