-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assertion failed '!"Unexpected tree op after call marked as tailcall"' #99798
Comments
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
We have ------------ BB05 [0005] [000..001) -> BB06(1) (always), preds={BB01} succs={BB06}
***** BB05 [0005]
STMT00006 ( INL01 @ ??? ... ??? ) <- INLRT @ 0x000[E-]
[000045] DACXG------ * STORE_LCL_VAR int V06 tmp4
[000046] --CXG------ \--* CALL ind nullcheck int
[000047] ----------- this +--* LCL_VAR byref V03 tmp1 (last use)
[000044] ---XG------ gctx +--* IND long
[000043] ----------- | \--* ADD long
[000039] ----------- | +--* SUB long
[000040] ----------- | | +--* LCL_VAR long V05 tmp3
[000041] ----------- | | \--* CNS_INT long 2
[000042] ----------- | \--* CNS_INT long 8
[000048] ----------- arg2 +--* LCL_VAR ref V01 arg1 (last use)
[000038] ---XG------ calli tgt \--* IND long
[000037] ----------- \--* SUB long
[000035] ----------- +--* LCL_VAR long V05 tmp3 (last use)
[000036] ----------- \--* CNS_INT long 2
------------ BB06 [0002] [000..00D) (return), preds={BB04,BB05} succs={}
***** BB06 [0002]
STMT00001 ( 0x000[E-] ... ??? )
[000014] --C-------- * RETURN int
[000023] ----------- \--* CAST int <- ubyte <- int
[000022] ----------- \--* LCL_VAR int V06 tmp4 (last use) and It looks exposed by #99265. |
Actually the call has |
…zation in inlining During call importation, for fat pointer calls we will introduce a local and spill the call to it. This loses track of the small typedness of the value, which can cause inlining to introduce unnecessary normalization casts later. For tailcalls this can cause us to add IR after the call that we do not expect, causing issues like dotnet#99798. Fix the problem by enhancing logic in a few places: - Make the local created for these fat pointer calls small typed like regular normalize-on-store locals - Enhance `fgCastNeeded` to take into account the small-typedness of these locals (like `IntegralRange::ForNode`)
…zation in inlining (#99806) During call importation, for fat pointer calls we will introduce a local and spill the call to it. This loses track of the small typedness of the value, which can cause inlining to introduce unnecessary normalization casts later. For tailcalls this can cause us to add IR after the call that we do not expect, causing issues like #99798. Fix the problem by enhancing logic in a few places: - Make the local created for these fat pointer calls small typed like regular normalize-on-store locals - Enhance `fgCastNeeded` to take into account the small-typedness of these locals (like `IntegralRange::ForNode`)
Currently failing in main. To repro:
Then find find the failing ilc.exe command line in the build log if you need it under debugger (look for "exited with code").
JitDump:
dump.txt
Cc @jakobbotsch @EgorBo
The text was updated successfully, but these errors were encountered: