Skip to content

Commit a4642dc

Browse files
committed
Updating xarch to utilize EVEX compares and blending where profitable
1 parent cc66c77 commit a4642dc

File tree

5 files changed

+711
-239
lines changed

5 files changed

+711
-239
lines changed

src/coreclr/jit/gentree.cpp

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -29536,42 +29536,9 @@ var_types GenTreeHWIntrinsic::GetLookupTypeForCmpOp(
2953629536
var_types lookupType = type;
2953729537

2953829538
#if defined(TARGET_XARCH)
29539-
switch (oper)
29539+
if (comp->canUseEvexEncoding())
2954029540
{
29541-
case GT_EQ:
29542-
{
29543-
if (simdSize == 64)
29544-
{
29545-
lookupType = TYP_MASK;
29546-
}
29547-
break;
29548-
}
29549-
29550-
case GT_GE:
29551-
case GT_LE:
29552-
case GT_NE:
29553-
{
29554-
if ((simdSize == 64) || (varTypeIsIntegral(simdBaseType) && comp->canUseEvexEncoding()))
29555-
{
29556-
lookupType = TYP_MASK;
29557-
}
29558-
break;
29559-
}
29560-
29561-
case GT_GT:
29562-
case GT_LT:
29563-
{
29564-
if ((simdSize == 64) || (varTypeIsUnsigned(simdBaseType) && comp->canUseEvexEncoding()))
29565-
{
29566-
lookupType = TYP_MASK;
29567-
}
29568-
break;
29569-
}
29570-
29571-
default:
29572-
{
29573-
unreached();
29574-
}
29541+
lookupType = TYP_MASK;
2957529542
}
2957629543
#endif // TARGET_XARCH
2957729544

src/coreclr/jit/hwintrinsic.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -546,12 +546,11 @@ struct HWIntrinsicInfo
546546
static bool isScalarIsa(CORINFO_InstructionSet isa);
547547

548548
#ifdef TARGET_XARCH
549-
static bool isAVX2GatherIntrinsic(NamedIntrinsic id);
550-
static FloatComparisonMode lookupFloatComparisonModeForSwappedArgs(FloatComparisonMode comparison);
551-
static NamedIntrinsic lookupIdForFloatComparisonMode(NamedIntrinsic intrinsic,
552-
FloatComparisonMode comparison,
553-
var_types simdBaseType,
554-
unsigned simdSize);
549+
static bool isAVX2GatherIntrinsic(NamedIntrinsic id);
550+
static NamedIntrinsic lookupIdForFloatComparisonMode(NamedIntrinsic intrinsic,
551+
FloatComparisonMode comparison,
552+
var_types simdBaseType,
553+
unsigned simdSize);
555554
#endif
556555

557556
// Member lookup

0 commit comments

Comments
 (0)