Skip to content

Commit a9c08d4

Browse files
Ensure that the VNFunc for HWIntrinsics are properly marked as commutative where possible (dotnet#75840)
1 parent e5b44af commit a9c08d4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/coreclr/jit/valuenum.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7049,6 +7049,12 @@ void ValueNumStore::InitValueNumStoreStatics()
70497049

70507050
ValueNumFuncSetArity(func, newArity);
70517051
}
7052+
7053+
if (HWIntrinsicInfo::IsCommutative(id))
7054+
{
7055+
VNFunc func = VNFunc(VNF_HWI_FIRST + (id - NI_HW_INTRINSIC_START - 1));
7056+
vnfOpAttribs[func] |= VNFOA_Commutative;
7057+
}
70527058
}
70537059

70547060
#endif // FEATURE_HW_INTRINSICS

0 commit comments

Comments
 (0)