Skip to content
Merged
Changes from 1 commit
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
18 changes: 18 additions & 0 deletions src/coreclr/jit/hwintrinsic.h
Original file line number Diff line number Diff line change
Expand Up @@ -1139,12 +1139,30 @@ struct HWIntrinsicInfo
}

#ifdef FEATURE_MASKED_HW_INTRINSICS
// HasAllMaskVariant: Does the intrinsic have an intrinsic variant that operates on mask types?
//
// Arguments:
// id -- the intrinsic to check for a mask-type variant.
//
// Return Value:
// true when the intrinsic has a mask-type variant, else false
//
static bool HasAllMaskVariant(NamedIntrinsic id)
{
const HWIntrinsicFlag flags = lookupFlags(id);
return (flags & HW_Flag_HasAllMaskVariant) != 0;
}

// GetMaskVariant: Given an intrinsic that has a variant that operates on mask types, return the ID of
// this variant intrinsic. Call HasAllMaskVariant before using this function, as it will
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may be in a follow-up PR, add assert(HasAllMaskVariant(id));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, there is a build failure, so can you fix this as well along with fixing the build error?

/__w/1/s/src/coreclr/jit/morpharm64.cpp:99:37: error: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Werror=sign-compare]
     99 |         if (node->GetOperandCount() == numArgs)
        |             ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~

// assert if no match is found.
//
// Arguments:
// id -- the intrinsic with a mask-type variant.
//
// Return Value:
// The ID of the mask-type variant for the given intrinsic
//
static NamedIntrinsic GetMaskVariant(NamedIntrinsic id)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i know lot of methods in this file don't have method summary, but we try to add them for newly added methods. So please add a line or 2 for them.

{
switch (id)
Expand Down
Loading