RFR: 8332268: C2: Add missing optimizations for UDivI/L and UModI/L and unify the shared logic with the signed nodes [v8]
theoweidmannoracle
duke at openjdk.org
Thu Nov 28 16:26:49 UTC 2024
On Thu, 28 Nov 2024 14:31:54 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 129:
>
>> 127: IRNode.DIV_BY_ZERO_TRAP, "1"
>> 128: })
>> 129: // Hotspot should keep the division because it may cause a division by zero trap
>
> This comment is actually incorrect, the division is kept because the transformation is wrong.
Which part of the transformation do you think is wrong? Do you think there might also be overflow issues and that's why it cannot be replaced with x?
(I took over this comment and test from the pre-existing test for the signed version: test/hotspot/jtreg/compiler/c2/irTests/DivINodeIdealizationTests.java.)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22061#discussion_r1862460329
More information about the hotspot-compiler-dev
mailing list