Skip to content
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

Fix loop hoisting float var profitability calculation #82352

Merged
merged 1 commit into from
Feb 22, 2023

Conversation

BruceForstall
Copy link
Member

Treat SIMD as float vars.

Fixes #82351

@ghost ghost assigned BruceForstall Feb 18, 2023
@BruceForstall
Copy link
Member Author

Depends on #82331

@BruceForstall
Copy link
Member Author

Diffs

@BruceForstall BruceForstall force-pushed the ChangeFPHoistProfitability branch from fedba43 to 7d5ef94 Compare February 19, 2023 19:33
@BruceForstall
Copy link
Member Author

(Modest) diffs show better hoisting: both hoisting int-reg expressions in loops with lots of SIMD, as well as SIMD expressions in loops with lots of int-regs.

@BruceForstall
Copy link
Member Author

@AndyAyersMS PTAL
cc @dotnet/jit-contrib

@BruceForstall
Copy link
Member Author

Odd, there are asserts in JitStressRegs=8:

[20:59:47] Invoking: C:\h\w\AB4909BC\p\superpmi.exe -v ewmi -r C:\h\w\AB4909BC\t\tmpc3utju9i\repro -p -jitoption JitStressRegs=8 -f C:\h\w\AB4909BC\t\tmpc3utju9i\libraries.pmi.windows.x64.checked.mch_fail.mcl -metricsSummary C:\h\w\AB4909BC\t\tmpc3utju9i\libraries.pmi.windows.x64.checked.mch_metrics.csv C:\h\w\AB4909BC\p\clrjit_win_x64_x64.dll C:\h\w\AB4909BC\p\artifacts\spmi\mch\b0e1ce41-2339-491d-ab72-736a8d233ea1.windows.x64\libraries.pmi.windows.x64.checked.mch

[21:01:47] ERROR: Exception thrown: DebugBreak or AV Exception 123

[21:01:47] ERROR: Method 13421 of size 9 failed to load and compile correctly (C:\h\w\AB4909BC\p\clrjit_win_x64_x64.dll).

[21:01:47] ERROR: Exception thrown: DebugBreak or AV Exception 123

[21:01:47] ERROR: Method 13429 of size 9 failed to load and compile correctly (C:\h\w\AB4909BC\p\clrjit_win_x64_x64.dll).

[21:01:47] ERROR: Exception thrown: DebugBreak or AV Exception 123

[21:01:47] ERROR: Method 13422 of size 9 failed to load and compile correctly (C:\h\w\AB4909BC\p\clrjit_win_x64_x64.dll).

[21:01:47] ERROR: Exception thrown: DebugBreak or AV Exception 123

[21:01:47] ERROR: Method 13423 of size 9 failed to load and compile correctly (C:\h\w\AB4909BC\p\clrjit_win_x64_x64.dll).

[21:01:47] ERROR: Exception thrown: DebugBreak or AV Exception 123

[21:01:47] ERROR: Method 13420 of size 9 failed to load and compile correctly (C:\h\w\AB4909BC\p\clrjit_win_x64_x64.dll).

[21:01:47] ERROR: Exception thrown: DebugBreak or AV Exception 123

[21:01:47] ERROR: Method 13428 of size 9 failed to load and compile correctly (C:\h\w\AB4909BC\p\clrjit_win_x64_x64.dll).

[21:01:47] ISSUE: <ASSERT> #13421 D:\a\_work\1\s\src\coreclr\jit\gentree.h (8125) - Assertion failed 'unreached' in 'System.Runtime.Intrinsics.X86.X86Base:DivRem(uint,int,int):System.ValueTuple`2[int,int]' during 'LSRA allocate' (IL size 9; hash 0xa7aea283; FullOpts)

[21:01:47] ISSUE: <ASSERT> #13429 D:\a\_work\1\s\src\coreclr\jit\gentree.h (8125) - Assertion failed 'unreached' in 'System.Runtime.Intrinsics.X86.X86Base+X64:DivRem(ulong,long,long):System.ValueTuple`2[long,long]' during 'LSRA allocate' (IL size 9; hash 0x7ec6deeb; FullOpts)

[21:01:47] ISSUE: <ASSERT> #13422 D:\a\_work\1\s\src\coreclr\jit\gentree.h (8125) - Assertion failed 'unreached' in 'System.Runtime.Intrinsics.X86.X86Base:DivRem(ulong,ulong,ulong):System.ValueTuple`2[ulong,ulong]' during 'LSRA allocate' (IL size 9; hash 0x5e7e955a; FullOpts)

[21:01:47] ISSUE: <ASSERT> #13423 D:\a\_work\1\s\src\coreclr\jit\gentree.h (8125) - Assertion failed 'unreached' in 'System.Runtime.Intrinsics.X86.X86Base:DivRem(ulong,long,long):System.ValueTuple`2[long,long]' during 'LSRA allocate' (IL size 9; hash 0x74788cda; FullOpts)

[21:01:47] ISSUE: <ASSERT> #13420 D:\a\_work\1\s\src\coreclr\jit\gentree.h (8125) - Assertion failed 'unreached' in 'System.Runtime.Intrinsics.X86.X86Base:DivRem(uint,uint,uint):System.ValueTuple`2[uint,uint]' during 'LSRA allocate' (IL size 9; hash 0xf27d1303; FullOpts)

[21:01:47] ISSUE: <ASSERT> #13428 D:\a\_work\1\s\src\coreclr\jit\gentree.h (8125) - Assertion failed 'unreached' in 'System.Runtime.Intrinsics.X86.X86Base+X64:DivRem(ulong,ulong,ulong):System.ValueTuple`2[ulong,ulong]' during 'LSRA allocate' (IL size 9; hash 0xb3ae736b; FullOpts)

[21:01:47] Compilation failures

https://dev.azure.com/dnceng-public/public/_build/results?buildId=177667&view=logs&jobId=83516c17-6666-5250-abde-63983ce72a49&j=83516c17-6666-5250-abde-63983ce72a49&t=2694d93b-a574-5310-1876-2e252085b877

@tannergooding
Copy link
Member

Cc. @kunalspathak looks related to the new divrem support

@EgorBo
Copy link
Member

EgorBo commented Feb 20, 2023

Filed #82397 for the assert so we can reference that issue on merge with CI failures

@BruceForstall BruceForstall merged commit f8dc059 into dotnet:main Feb 22, 2023
@BruceForstall BruceForstall deleted the ChangeFPHoistProfitability branch February 22, 2023 18:44
@ghost ghost locked as resolved and limited conversation to collaborators Mar 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JIT: hoisting float var profitability mis-categorizes SIMD types
4 participants