Skip to content

Commit

Permalink
Adding some additional clarifying comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tannergooding committed Jul 2, 2020
1 parent d3afbdf commit 3ac2b4a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/coreclr/src/jit/importer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3519,6 +3519,9 @@ GenTree* Compiler::impIntrinsic(GenTree* newobjThis,

if ((ni > NI_SIMD_AS_HWINTRINSIC_START) && (ni < NI_SIMD_AS_HWINTRINSIC_END))
{
// These intrinsics aren't defined recursively and so they will never be mustExpand
// Instead, they provide software fallbacks that will be executed instead.

assert(!mustExpand);
return impSimdAsHWIntrinsic(ni, clsHnd, method, sig, newobjThis);
}
Expand Down
9 changes: 9 additions & 0 deletions src/coreclr/src/jit/lowerarmarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,8 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node)

if ((simdSize == 8) && (simdType == TYP_DOUBLE))
{
// TODO-Cleanup: Struct retyping means we have the wrong type here. We need to
// manually fix it up so the simdType checks below are correct.
simdType = TYP_SIMD8;
}

Expand Down Expand Up @@ -1189,6 +1191,13 @@ void Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node)

if (baseType == TYP_FLOAT)
{
// Float needs an additional pairwise add to finish summing the parts
// The first will have summed e0 with e1 and e2 with e3 and then repeats that for the upper half
// So, we will have a vector that looks like this:
// < e0 + e1, e2 + e3, e0 + e1, e2 + e3>
// Doing a second horizontal add with itself will then give us
// e0 + e1 + e2 + e3 in all elements of the vector

// We will be constructing the following parts:
// ...
// /--* tmp1 simd16
Expand Down
2 changes: 2 additions & 0 deletions src/coreclr/src/jit/lowerxarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1402,6 +1402,8 @@ void Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node)

if ((simdSize == 8) && (simdType == TYP_DOUBLE))
{
// TODO-Cleanup: Struct retyping means we have the wrong type here. We need to
// manually fix it up so the simdType checks below are correct.
simdType = TYP_SIMD8;
}

Expand Down

0 comments on commit 3ac2b4a

Please sign in to comment.