Skip to content

[RISC-V] Check DivideByZeroException before generating check for unsigned div/mod#98648

Merged
jakobbotsch merged 2 commits intodotnet:mainfrom
tomeksowi:check-div-by-zero-exception
Feb 22, 2024
Merged

[RISC-V] Check DivideByZeroException before generating check for unsigned div/mod#98648
jakobbotsch merged 2 commits intodotnet:mainfrom
tomeksowi:check-div-by-zero-exception

Conversation

@tomeksowi
Copy link
Member

@tomeksowi tomeksowi commented Feb 19, 2024

Generate check for unsigned divide by zero only when ExceptionSetFlags::DivideByZeroException is present

Not doing so caused JITting on FullOpts fail on assert(add->acdUsed) in genJumpToThrowHlpBlk_la when the DivByZero check was optimized out as a result of #98113

Part of #84834
cc @wscho77 @HJLeee @clamp03 @JongHeonChoi @t-mustafin @gbalykov @viewizard @ashaurtaev @brucehoult @sirntar @yurai007 @Bajtazar @bartlomiejko @romanzagorowski

…s::DivideByZeroException is present

Not doing so caused JITting on FullOpts fail on assert(add->acdUsed) in genJumpToThrowHlpBlk_la when the DivByZero check was optimized out as a result of dotnet#98113
@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Feb 19, 2024
@ghost
Copy link

ghost commented Feb 19, 2024

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

Issue Details

null

Author: tomeksowi
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@tomeksowi tomeksowi changed the title [RISC-VCheck div by zero exception [RISC-V] Check DivideByZeroException before generating check for unsigned div/mod Feb 19, 2024
@clamp03 clamp03 added the arch-riscv Related to the RISC-V architecture label Feb 19, 2024
@ryujit-bot
Copy link

Diff results for #98648

Throughput diffs

Throughput diffs for osx/arm64 ran on linux/x64

MinOpts (-0.01% to +0.00%)
Collection PDIFF
realworld.run.osx.arm64.checked.mch -0.01%

Details here


@tomeksowi tomeksowi marked this pull request as ready for review February 20, 2024 07:05
@jakobbotsch jakobbotsch merged commit 24a9069 into dotnet:main Feb 22, 2024
@EgorBo
Copy link
Member

EgorBo commented Feb 22, 2024

Sorry for breaking RISC-V 🙂

@clamp03
Copy link
Member

clamp03 commented Feb 22, 2024

cc @shushanhf LOONGARCH64 can have the same issue.

@shushanhf
Copy link
Contributor

cc @shushanhf LOONGARCH64 can have the same issue.

Thanks very much.

@brucehoult
Copy link

LGTM

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-riscv Related to the RISC-V architecture area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants