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

Insert missing break in hwintrinsicarm64.cpp #35713

Merged
merged 1 commit into from
May 4, 2020

Conversation

Gnbrkm41
Copy link
Contributor

@Gnbrkm41 Gnbrkm41 commented May 1, 2020

In my previous PR to introduce / vectorise Vector{Size}<T>.AllBitsSet / Zero
(#33924), there was a missing break; in a switch statement in the importation logic, which resulted in the correct functions not being imported as GT_HWINTRINSIC nodes as the control fell through the default block, returning nullptr (meaning the method is not a valid HWINTRINSIC node and should be imported as regular function).

This was pointed out in #35300 (comment) by @echesakovMSFT, where Vector128.CreateScalar methods were found out to be using the software fallback.

JitDump of the importation part, prior to this change:

    [ 0]  10 (0x00a) call 0A00007D
In Compiler::impImportCall: opcode is call, kind=0, callRetType is struct, structSize is 8
Named Intrinsic System.Runtime.Intrinsics.Vector64`1.get_Zero: Notify VM instruction set (Vector64) must be supported.
Recognized
  Known type Vector64<int>
  Known type Vector64<int>
  Known type Vector64<int>


               [000039] I-C-G-------              ▌  CALL      simd8  System.Runtime.Intrinsics.Vector64`1[Int32][System.Int32].get_Zero (exactContextHnd=0x0000FFFF11276419)

JitDump of the importation part, after this change:

    [ 0]  10 (0x00a) call 0A00007D
In Compiler::impImportCall: opcode is call, kind=0, callRetType is struct, structSize is 8
Named Intrinsic System.Runtime.Intrinsics.Vector64`1.get_Zero: Notify VM instruction set (Vector64) must be supported.
Recognized
  Known type Vector64<int>
  Known type Vector64<int>

    [ 1]  15 (0x00f) stloc.0
lvaGrabTemp returning 4 (V04 tmp3) (a long lifetime temp) called for Inline stloc first use temp.
  Known type Vector64<int>


               [000041] -A----------              ▌  ASG       simd8  (copy)
               [000039] D------N----              ├──▌  LCL_VAR   simd8 <System.Runtime.Intrinsics.Vector64`1[Int32]> V04 tmp3
               [000038] ------------              └──▌  HWINTRINSIC simd8  int get_Zero

(I'm so sorry for missing this out, I think the build I was testing with before was somehow outdated)

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label May 1, 2020
Copy link
Contributor

@echesakov echesakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this!

@echesakov echesakov merged commit bddbb03 into dotnet:master May 4, 2020
@Gnbrkm41 Gnbrkm41 deleted the fix_allbitsset branch May 6, 2020 11:34
@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
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.

4 participants