Skip to content

Commit

Permalink
Updating xarch to utilize EVEX compares and blending where profitable
Browse files Browse the repository at this point in the history
  • Loading branch information
tannergooding committed Dec 10, 2024
1 parent cc66c77 commit 9cdb430
Show file tree
Hide file tree
Showing 5 changed files with 698 additions and 230 deletions.
37 changes: 2 additions & 35 deletions src/coreclr/jit/gentree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29536,42 +29536,9 @@ var_types GenTreeHWIntrinsic::GetLookupTypeForCmpOp(
var_types lookupType = type;

#if defined(TARGET_XARCH)
switch (oper)
if (comp->canUseEvexEncoding())
{
case GT_EQ:
{
if (simdSize == 64)
{
lookupType = TYP_MASK;
}
break;
}

case GT_GE:
case GT_LE:
case GT_NE:
{
if ((simdSize == 64) || (varTypeIsIntegral(simdBaseType) && comp->canUseEvexEncoding()))
{
lookupType = TYP_MASK;
}
break;
}

case GT_GT:
case GT_LT:
{
if ((simdSize == 64) || (varTypeIsUnsigned(simdBaseType) && comp->canUseEvexEncoding()))
{
lookupType = TYP_MASK;
}
break;
}

default:
{
unreached();
}
lookupType = TYP_MASK;
}
#endif // TARGET_XARCH

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

0 comments on commit 9cdb430

Please sign in to comment.