Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/coreclr/src/jit/hwintrinsicxarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic,
else
{
assert(intrinsic == NI_Vector256_AsVector256);
return impBaseIntrinsic(NI_Vector128_ToVector256, clsHnd, method, sig, baseType, retType, simdSize);
return impBaseIntrinsic(NI_Vector128_ToVector256, clsHnd, method, sig, baseType, retType, 16);
}
}

Expand Down
19 changes: 19 additions & 0 deletions src/coreclr/src/jit/simd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1824,6 +1824,25 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode,
return nullptr;
}

#if defined(TARGET_XARCH)
CORINFO_InstructionSet minimumIsa = InstructionSet_SSE2;
#elif defined(TARGET_ARM64)
CORINFO_InstructionSet minimumIsa = InstructionSet_AdvSimd;
#else
#error Unsupported platform
#endif // !TARGET_XARCH && !TARGET_ARM64

if (!compOpportunisticallyDependsOn(minimumIsa))
{
// The user disabled support for the baseline ISA so
// don't emit any SIMD intrinsics as they all require
// this at a minimum. We will, however, return false
// for IsHardwareAccelerated as that will help with
// dead code elimination.

return (intrinsicInfo->id == SIMDIntrinsicHWAccel) ? gtNewIconNode(0, TYP_INT) : nullptr;
}

SIMDIntrinsicID simdIntrinsicID = intrinsicInfo->id;
var_types simdType;
if (baseType != TYP_UNKNOWN)
Expand Down