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
{{ message }}
Repository navigation
JIT: (bug) VN ignores HWIntrinsic auxiliary type, so Avx2.GatherVector128 with int and long indices is treated as equal #134486
Two Avx2.GatherVector128 calls that differ only in index element type (vpgatherdd vs vpgatherqd) get the same liberal VN. RBO then folds a compare on the second gather's result, giving a wrong result in optimized code.
No, this isn't a regression. .NET 8.0.31, 9.0.20, 10.0.12, 11.0.0-rc.2 and main all print 1.
Notes
fgValueNumberHWIntrinsic builds the VN from the VNFunc, VNForSimdType(simdSize, simdBaseType) and the operand VNs. GetAuxiliaryType() is not part of it.
Possible fix: include the auxiliary type in the VN, or use distinct VNFuncs.
Not verified, but these may also be affected: arm64 AddWideningUpper/SubtractWideningUpper, AddSaturateScalar, and the AvxVnniInt8/AvxVnniInt16 overloads.
Activity
dotnet-policy-service commentedon Sep 23, 2026
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.
JIT: Include auxiliary types in hardware intrinsic value numbering (#…