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: Assertion failed 'isContainable || supportsRegOptional' during 'Generate code' #111613
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIin-prThere is an active PR which will close this issue when it is merged
// Generated by Fuzzlyn v2.4 on 2025-01-19 15:15:14// Run on X64 Windows// Seed: 9992515068480039116-vectort,vector128,vector256,x86aes,x86avx,x86avx2,x86avx512bw,x86avx512bwvl,x86avx512cd,x86avx512cdvl,x86avx512dq,x86avx512dqvl,x86avx512f,x86avx512fvl,x86avx512fx64,x86bmi1,x86bmi1x64,x86bmi2,x86bmi2x64,x86fma,x86lzcnt,x86lzcntx64,x86pclmulqdq,x86popcnt,x86popcntx64,x86sse,x86ssex64,x86sse2,x86sse2x64,x86sse3,x86sse41,x86sse41x64,x86sse42,x86sse42x64,x86ssse3,x86x86base// Reduced from 86.1 KiB to 0.3 KiB in 00:02:16// Hits JIT assert in Release:// Assertion failed 'isContainable || supportsRegOptional' in 'Program:Main(Fuzzlyn.ExecutionServer.IRuntime)' during 'Generate code' (IL size 30; hash 0xade6b36b; FullOpts)// // File: D:\a\_work\1\s\src\coreclr\jit\hwintrinsiccodegenxarch.cpp Line: 61// usingSystem;usingSystem.Numerics;usingSystem.Runtime.Intrinsics;usingSystem.Runtime.Intrinsics.X86;publicclassProgram{publicstaticvoidMain(){varvr3=Vector256.Create<long>(1);Vector128<float>vr4=Avx512DQ.VL.ConvertToVector128Single(vr3);System.Console.WriteLine(vr4.AsUInt32());}}
Actual cause is a pre-existing bug in TryFoldCnsVecForEmbeddedBroadcast, where it uses parent SimdSize to determine the size of the broadcast node. Since the parent intrinsic here narrows, its SimdSize is half that of the child.
So the containment check before conversion to broadcast succeeds and we contain the node, but then the validity check at codegen fails because the child is too small (even though only a scalar is used from it anyway).
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIin-prThere is an active PR which will close this issue when it is merged
Activity
dotnet-policy-service commentedon Jan 20, 2025
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.
EgorBo commentedon Jan 20, 2025
cc @tannergooding @saucecontrol could be some recent PRs?
jakobbotsch commentedon Jan 20, 2025
Yep, you probably missed that I bisected it to #110736 above
EgorBo commentedon Jan 20, 2025
oops, didn't see it indeed 😆
saucecontrol commentedon Jan 20, 2025
Codegen is actually fine, so it's kind of a bogus assert. Before and after #110763
Actual cause is a pre-existing bug in
TryFoldCnsVecForEmbeddedBroadcast, where it uses parentSimdSizeto determine the size of the broadcast node. Since the parent intrinsic here narrows, itsSimdSizeis half that of the child.So the containment check before conversion to broadcast succeeds and we contain the node, but then the validity check at codegen fails because the child is too small (even though only a scalar is used from it anyway).
I'll put up a fix in a bit.
JIT: Fix embedded broadcast simd size (#111638)