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
usingSystem;usingSystem.Runtime.CompilerServices;usingSystem.Runtime.Intrinsics;usingSystem.Runtime.Intrinsics.X86;classProgram{[MethodImpl(MethodImplOptions.NoInlining|MethodImplOptions.AggressiveOptimization)]staticVector128<float>Test(Vector128<float>a,Vector128<float>b)=>~Sse.CompareScalarEqual(a,b);staticvoidMain(){if(!Sse.IsSupported)thrownewPlatformNotSupportedException("SSE is required.");Vector128<float>value=Vector128.Create(1.0f,2.0f,3.0f,4.0f);Console.WriteLine(Test(value,value).AsUInt32().GetElement(1).ToString("X8"));}}
Expected
BFFFFFFF
CompareScalarEqual copies lane 1 from the first input (2.0f = 0x40000000); the full-vector ~ must complement it.
Actual
40000000
Platform
Windows x64, .NET 11.0.0-rc.1.26425.128. Also reproduces with Avx.CompareScalar.
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.
[-]JIT: complementing a scalar SIMD comparison leaves upper lanes unchanged[/-][+]JIT: (bug) complementing a scalar SIMD comparison leaves upper lanes unchanged[/+]Fix SIMD complement and scalar FMA folding (#133542)
EgorBo commentedon Sep 18, 2026
Affected SDK versions: