You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code returns a different value under jit optimizations on arm64:
public static int Main()
{
int result = Vector128.IndexOf(
AdvSimd.SubtractRoundedHighNarrowingUpper(Vector64<uint>.AllBitsSet,
Vector128<ulong>.AllBitsSet,
Vector128<ulong>.AllBitsSet),
Vector.Dot(Vector<uint>.One, Vector<uint>.One));
return result == -1 ? 100 : 101;
}
jit generates CMEQ for Vector IndexOf which expects the dot product in every lane.
Lowering for this Vector.Dot uses AddAcross (ADDV) which writes to only lane 0.
Either we shouldn't have dropped the toScalar+Create during Morph, or lower must explicitly broadcast as well.
Activity
dotnet-policy-service commentedon Aug 26, 2026
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.
Fix Vector.Dot on arm64 (#133215)
Fix Vector.Dot on arm64 (dotnet#133215)