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

Updating xarch to utilize EVEX compares and blending where possible #110342

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
8 changes: 5 additions & 3 deletions src/coreclr/jit/gentree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29540,7 +29540,7 @@ var_types GenTreeHWIntrinsic::GetLookupTypeForCmpOp(
{
case GT_EQ:
{
if (simdSize == 64)
if ((simdSize == 64) || (comp->opts.OptimizationEnabled() && comp->canUseEvexEncoding()))
{
lookupType = TYP_MASK;
}
Expand All @@ -29551,7 +29551,8 @@ var_types GenTreeHWIntrinsic::GetLookupTypeForCmpOp(
case GT_LE:
case GT_NE:
{
if ((simdSize == 64) || (varTypeIsIntegral(simdBaseType) && comp->canUseEvexEncoding()))
if ((simdSize == 64) ||
((comp->opts.OptimizationEnabled() || varTypeIsIntegral(simdBaseType)) && comp->canUseEvexEncoding()))
{
lookupType = TYP_MASK;
}
Expand All @@ -29561,7 +29562,8 @@ var_types GenTreeHWIntrinsic::GetLookupTypeForCmpOp(
case GT_GT:
case GT_LT:
{
if ((simdSize == 64) || (varTypeIsUnsigned(simdBaseType) && comp->canUseEvexEncoding()))
if ((simdSize == 64) ||
((comp->opts.OptimizationEnabled() || varTypeIsUnsigned(simdBaseType)) && comp->canUseEvexEncoding()))
{
lookupType = TYP_MASK;
}
Expand Down
11 changes: 5 additions & 6 deletions src/coreclr/jit/hwintrinsic.h
Original file line number Diff line number Diff line change
Expand Up @@ -546,12 +546,11 @@ struct HWIntrinsicInfo
static bool isScalarIsa(CORINFO_InstructionSet isa);

#ifdef TARGET_XARCH
static bool isAVX2GatherIntrinsic(NamedIntrinsic id);
static FloatComparisonMode lookupFloatComparisonModeForSwappedArgs(FloatComparisonMode comparison);
static NamedIntrinsic lookupIdForFloatComparisonMode(NamedIntrinsic intrinsic,
FloatComparisonMode comparison,
var_types simdBaseType,
unsigned simdSize);
static bool isAVX2GatherIntrinsic(NamedIntrinsic id);
static NamedIntrinsic lookupIdForFloatComparisonMode(NamedIntrinsic intrinsic,
FloatComparisonMode comparison,
var_types simdBaseType,
unsigned simdSize);
#endif

// Member lookup
Expand Down
Loading