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) CompareNotGreaterThan feeding a conditional select is evaluated as GreaterThan #133550
usingSystem;usingSystem.Runtime.CompilerServices;usingSystem.Runtime.Intrinsics;usingSystem.Runtime.Intrinsics.X86;classProgram{[MethodImpl(MethodImplOptions.NoInlining|MethodImplOptions.AggressiveOptimization)]staticfloatTest(Vector128<float>a,Vector128<float>b,Vector128<float>x,Vector128<float>y)=>Vector128.ConditionalSelect(Sse.CompareNotGreaterThan(a,b),x,y).GetElement(0);staticvoidMain(){if(!Avx512F.IsSupported)thrownewPlatformNotSupportedException("AVX-512F is required.");varx=Vector128.Create(111.0f);vary=Vector128.Create(222.0f);// 1 is not greater than 2, so the mask is all-ones and x must be selected.Console.WriteLine(Test(Vector128.Create(1.0f),Vector128.Create(2.0f),x,y));// 2 is not greater than 2, so the mask is all-ones and x must be selected.Console.WriteLine(Test(Vector128.Create(2.0f),Vector128.Create(2.0f),x,y));// 3 is greater than 2, so the mask is all-zeros and y must be selected.Console.WriteLine(Test(Vector128.Create(3.0f),Vector128.Create(2.0f),x,y));}}
Expected
111
111
222
Actual
222
222
111
The comparison result is inverted: every lane selects the opposite operand. Running the same
program with DOTNET_EnableAVX512=0 prints the expected values, so only the AVX-512 path is
affected.
Platform
Windows x64 with AVX-512F, local Checked build of dotnet/runtime main (ef97eb5).
It currently only exists in main (12.0). The repro still fails on the shipped 11.0 RC2 SDK (11.0.100-rc.2.26467.112), while 8.0.425, 9.0.318 and 10.0.401 all behave correctly, so this is a regression introduced during the 11.0 cycle rather than a long-standing bug — 11.0 would ship with it.
Note: this comment was produced by an AI agent; the repro was re-run against all four released SDKs to confirm the results above.
Activity
dotnet-policy-service commentedon Sep 10, 2026
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.
Fix not-greater-than predicate when lowering SIMD selects (#133589)
EgorBo commentedon Sep 18, 2026
Affected SDK versions:
EgorBo commentedon Sep 18, 2026
@tannergooding would you consider backporting the fix from #133589 to
release/11.0?It currently only exists in
main(12.0). The repro still fails on the shipped 11.0 RC2 SDK (11.0.100-rc.2.26467.112), while 8.0.425, 9.0.318 and 10.0.401 all behave correctly, so this is a regression introduced during the 11.0 cycle rather than a long-standing bug — 11.0 would ship with it.Note: this comment was produced by an AI agent; the repro was re-run against all four released SDKs to confirm the results above.
[release/11.0] Fix not-greater-than predicate when lowering SIMD sele…