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) wrong result when a masked vcvttpd2dq ymm -> xmm is embedded into a Vector128<long> ConditionalSelect (AVX-512) #137901
On AVX-512VL hardware, a Vector128<long>ConditionalSelect with Avx.ConvertToVector128Int32WithTruncation(Vector256<double>) as its true operand gets folded into EVEX embedded masking on vcvttpd2dq xmm {k}, ymm. The mask has 2 qword lanes, but the instruction masks 4 dword lanes, so dwords 2..3 come from the false operand.
Reproduces on current main (Checked) and on the official 12.0.0-alpha.1.26557.102 build. The original report says .NET 10.0.15 doesn't reproduce (not re-verified).
Notes
ContainCheckHWIntrinsic (lowerxarch.cpp) computes tgtMaskSize = simdSize / genTypeSize(simdBaseType) (2), and GenTree::isEmbeddedMaskingCompatible accepts it. For the narrowing vcvttpd2dq/vcvtpd2dq with a 256-bit source, however, the write mask applies per destination dword (4 lanes). Embedded masking should be rejected for these narrowing conversions, or the mask lane count should be derived from the destination element size.
Activity
dotnet-policy-service commentedon Nov 19, 2026
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.
JIT: don't embed masks into narrowing conversions (dotnet#138230)