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) complementing an AVX comparison drops the complement #133518
usingSystem;usingSystem.Runtime.CompilerServices;usingSystem.Runtime.Intrinsics;usingSystem.Runtime.Intrinsics.X86;classProgram{[MethodImpl(MethodImplOptions.NoInlining|MethodImplOptions.AggressiveOptimization)]staticVector256<float>Test(Vector256<float>a,Vector256<float>b)=>~Avx.Compare(a,b,FloatComparisonMode.OrderedNotEqualNonSignaling);staticvoidMain(){if(!Avx.IsSupported)thrownewPlatformNotSupportedException("AVX is required.");Vector256<float>value=Vector256.Create(1.0f);Console.WriteLine(Test(value,value).AsUInt32().GetElement(0).ToString("X8"));}}
Expected
FFFFFFFF
Equal non-NaN lanes fail ordered-not-equal, so the comparison yields zero bits and the complement is all-bits-set.
changed the title [-]JIT: complementing an AVX comparison drops the complement[/-][+]JIT: (bug) complementing an AVX comparison drops the complement[/+]on Sep 10, 2026
Activity
dotnet-policy-service commentedon Sep 9, 2026
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.
MihuBot commentedon Sep 9, 2026
I'm a bot. Here is a possible related and/or duplicate issue (I may be wrong):
~x op kwithout inverting the comparison #129076[-]JIT: complementing an AVX comparison drops the complement[/-][+]JIT: (bug) complementing an AVX comparison drops the complement[/+]Fix SIMD complement and scalar FMA folding (dotnet#133542)
EgorBo commentedon Sep 18, 2026
Affected SDK versions: