RFR: 8284742: x86: Handle integral division overflow during parsing [v3]

Quan Anh Mai duke at openjdk.java.net
Thu Apr 14 12:03:18 UTC 2022


On Thu, 14 Apr 2022 11:11:16 GMT, Nick Gasson <ngasson at openjdk.org> wrote:

>> Quan Anh Mai has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - removeRedundant
>>  - move code to parse instead
>
> On AArch64 we don't need the special case handling because the `sdiv` instruction already gives 0x80000000 / -1 = 0x8000000 and doesn't trap.

@nick-arm Thanks a lot for your response. IIUC, AArch64 may benefit from this patch by parsing `irem` and `lrem` as `Sub src1 (Mul src2 (Div src1 src2))`, which would help eliminate a redundant `sdiv` instruction when both the remainder and division operations appear together.

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

PR: https://git.openjdk.java.net/jdk/pull/8206


More information about the hotspot-compiler-dev mailing list