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) Vector128.Equals(Avx.Compare(a, b, UnorderedEqual*/OrderedNotEqual*), Zero) produces bad IR on AVX-512 (assert / wrong result / illegal instruction) #134480
On AVX-512 hardware, Equals(Compare(...), Zero) is morphed into a NOT whose result is a TYP_MASK node that is no longer wrapped in ConvertMaskToVector. The result is an assert, a wrong result, or an illegal instruction.
Assert failure: Assertion failed 'varTypeIsSIMD(op1)' in 'Program:Test(...)' during 'Morph - Global'
File: src\coreclr\jit\gentree.cpp:24477
Release:
<5, 0, 0, 0>
Fatal error.
System.ExecutionEngineException: Illegal instruction: Attempted to execute an instruction code not defined by the processor.
at Program.Test2(...)
Regression?
Yes, a regression in .NET 10. .NET 8 and 9 give the correct result. .NET 10, 11 RC2 and main fail.
Notes
The bug needs AVX-512 hardware; with DOTNET_EnableAVX512=0 the output is correct. fgMorphHWIntrinsicRequired turns EQ(mask, Zero) into ~op1. The GT_NOT case in fgOptimizeHWIntrinsic then peels ConvertMaskToVector, and in the NI_AVX512_CompareMask mode-reversal path (and the ~(~v) path) returns the TYP_MASK node without re-wrapping it in cvtIntrin.
Activity
dotnet-policy-service commentedon Sep 22, 2026
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.
Preserve vector results when folding AVX-512 mask complements (#134520)