RFR: 8277882: New subnode ideal optimization: converting "c0 - (x + c1)" into "(c0 - c1) - x" [v4]
Mai Đặng Quân Anh
duke at openjdk.java.net
Wed Dec 1 13:37:27 UTC 2021
On Tue, 30 Nov 2021 22:44:59 GMT, Zang, Zhiqiang <duke at openjdk.java.net> wrote:
>> Suggest two new optimizations that can be done in SubINode::Ideal.
>
> Zang, Zhiqiang has updated the pull request incrementally with one additional commit since the last revision:
>
> add ok_to_convert to the condition.
src/hotspot/share/opto/subnode.cpp line 195:
> 193: if (in2->Opcode() == Op_AddI
> 194: && phase->type(in1)->isa_int() != NULL
> 195: && phase->type(in1)->isa_int()->is_con()
Line 194 and 195 can be expressed as `in1->Opcode() == Op_ConI`, same for the next 2 lines.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6441
More information about the hotspot-compiler-dev
mailing list