RFR: 8332268: C2: Add missing optimizations for UDivI/L and UModI/L and unify the shared logic with the signed nodes [v8]
Quan Anh Mai
qamai at openjdk.org
Thu Nov 28 16:21:18 UTC 2024
On Thu, 28 Nov 2024 14:32:41 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:
>> theoweidmannoracle has updated the pull request incrementally with one additional commit since the last revision:
>>
>> abs(MIN_INT) is not positive
>
> test/hotspot/jtreg/compiler/c2/irTests/UDivINodeIdealizationTests.java line 146:
>
>> 144: @IR(counts = {IRNode.URSHIFT, "1"})
>> 145: public int divByPow2Big(int x) {
>> 146: return Integer.divideUnsigned(x, -2147483648); // -2147483648 = Integer.parseUnsignedInt("2147483648")
>
> You should use `Integer.MIN_VALUE`
In general, I think `1 << someValue` would be better than the decimal representation.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22061#discussion_r1862453232
More information about the hotspot-compiler-dev
mailing list