-
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
Fix 97272 #99818
Fix 97272 #99818
Conversation
/azp run runtime-nativeaot-outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
760296f
to
c16c0e3
Compare
/azp list |
/azp run runtime-coreclr outerloop, runtime-coreclr jitstress-isas-x86, runtime-coreclr jitstress-isas-arm |
Azure Pipelines successfully started running 3 pipeline(s). |
/azp run runtime-coreclr jitstress-isas-x86, runtime-coreclr jitstress-isas-arm |
Azure Pipelines successfully started running 2 pipeline(s). |
@tannergooding or anyone from @dotnet/jit-contrib could you take a look? Vector128<int> Foo(Vector128<int> v)
{
byte mask = 0b11110000;
return Sse2.Shuffle(v, mask);
} Main: ; Method MyBench:Foo
mov rcx, rdx
mov rdx, r8
mov r8d, 240
tail.jmp [Sse2:Shuffle(Vector128`1[int],ubyte):Vector128`1[int]]
; Total bytes of code: 18 PR: ; Method MyBench:Foo
vpshufd xmm0, xmmword ptr [r8], -16
vmovups xmmword ptr [rdx], xmm0
mov rax, rdx
ret
; Total bytes of code: 14 There a few regressions which are just PMI-artifacts, e.g. we inline the fallback here. but it shouldn't matter since the method is supposed to be inlined (AggressiveInlining).
|
There's two libraries-pmi regressions that look interesting. I think in production they aren't actually hit for the cases highlighted because they are small methods that get inlined and the constant is propagated. But, it showcases an issue where we aren't preserving it as a call for the non-constant case, so we end up expanding the jump table inline instead, this can lead to nasty code explosion in some cases and that is potentially concerning (particularly for T0 like code). |
333e303
to
761b6bc
Compare
@tannergooding PTAL again, your work to rewrite HWINTRINSIC as calls helped to remove the hacks I had in the previous version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks a lot better now, thanks!
Fixes #97272