Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions src/coreclr/jit/hwintrinsicxarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3233,6 +3233,38 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic,
break;
}

if ((simdSize == 32) && !varTypeIsFloating(simdBaseType) &&
!compOpportunisticallyDependsOn(InstructionSet_AVX2))
{
// We can't deal with TYP_SIMD32 for integral types if the compiler doesn't support AVX2
break;
}

assert(simdSize != 64 || IsBaselineVector512IsaSupportedDebugOnly());

if (varTypeIsLong(simdBaseType))
{
if (TARGET_POINTER_SIZE == 4)
{
// TODO-XARCH-CQ: 32bit support
break;
}

if ((simdSize == 32) && compOpportunisticallyDependsOn(InstructionSet_AVX2))
{
// Emulate NI_AVX512DQ_VL_MultiplyLow with AVX2 for SIMD32
}
else if ((simdSize == 16) && compOpportunisticallyDependsOn(InstructionSet_SSE41))
{
// Emulate NI_AVX512DQ_VL_MultiplyLow with SSE41 for SIMD16
}
else
{
// Software fallback
break;
}
}

op3 = impSIMDPopStack();
op2 = impSIMDPopStack();
op1 = impSIMDPopStack();
Expand Down
Loading