Skip to content
Merged
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
5 changes: 2 additions & 3 deletions src/coreclr/jit/gentree.h
Original file line number Diff line number Diff line change
Expand Up @@ -2244,13 +2244,12 @@ struct GenTree
#if defined(TARGET_XARCH) && defined(FEATURE_HW_INTRINSICS)
bool IsEmbMaskOp()
{
bool result = (gtFlags & GTF_HW_EM_OP) != 0;
assert(!result || (gtOper == GT_HWINTRINSIC));
return result;
return OperIsHWIntrinsic() && ((gtFlags & GTF_HW_EM_OP) != 0);
Copy link
Member Author

Choose a reason for hiding this comment

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

None of the callsites were checking OperIsHWIntrinsic() first, so needed to make the check explicit.

Asserting in MakeEmbMaskOp was then appropriate since it did check first.

}

void MakeEmbMaskOp()
{
assert(OperIsHWIntrinsic());
assert(!IsEmbMaskOp());
gtFlags |= GTF_HW_EM_OP;
}
Expand Down