Skip to content

Commit ec1a6b9

Browse files
Ensure the assert in IsEmbMaskOp is correct (#98306)
* Ensure the assert in IsEmbMaskOp is correct * Have IsEmbMaskOp check, rather than assert, the node is a HWIntrinsic
1 parent 6299d3e commit ec1a6b9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/coreclr/jit/gentree.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2244,13 +2244,12 @@ struct GenTree
22442244
#if defined(TARGET_XARCH) && defined(FEATURE_HW_INTRINSICS)
22452245
bool IsEmbMaskOp()
22462246
{
2247-
bool result = (gtFlags & GTF_HW_EM_OP) != 0;
2248-
assert(!result || (gtOper == GT_HWINTRINSIC));
2249-
return result;
2247+
return OperIsHWIntrinsic() && ((gtFlags & GTF_HW_EM_OP) != 0);
22502248
}
22512249

22522250
void MakeEmbMaskOp()
22532251
{
2252+
assert(OperIsHWIntrinsic());
22542253
assert(!IsEmbMaskOp());
22552254
gtFlags |= GTF_HW_EM_OP;
22562255
}

0 commit comments

Comments
 (0)