Skip to content

JIT: (bug) Vector128.Dot with a scalar-widened operand hits a JIT assert #133551

Closed

Description

@EgorBo

Repro

using System;
using System.Runtime.CompilerServices;
using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.X86;

class Program
{
    [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.AggressiveOptimization)]
    static float Test(float x, Vector128<float> v) =>
        Vector128.Dot(Vector128.CreateScalarUnsafe(x), v);

    static void Main()
    {
        if (!Avx.IsSupported)
            throw new PlatformNotSupportedException("AVX is required.");

        Console.WriteLine(Test(3.0f, Vector128.Create(2.0f)));
    }
}

Expected

6

Actual

Assert failure(PID 21972 [0x000055d4], Thread: 123408 [0x1e210]): Assertion failed 'false && "found use of a node that is not in the LIR sequence"' in 'Program:Test(float,System.Runtime.Intrinsics.Vector128`1[float]):float' during 'Lowering nodeinfo' (IL size 13; hash 0x1ad19734; FullOpts)

    File: C:\prj\runtime-main3\src\coreclr\jit\lir.cpp:1692

The same assert fires for Vector128.Dot(v, Vector128.CreateScalarUnsafe(x)), for the double
forms, and for the Vector256 forms. Running with DOTNET_EnableAVX=0 prints the expected 6.

Platform

Windows x64 with AVX, local Checked build of dotnet/runtime main (ef97eb5).

Activity

  1. added this to the 12.0.0 milestone on Sep 10, 2026
  2. added
    area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
    on Sep 10, 2026
  3. dotnet-policy-service commented on Sep 10, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
    See info in area-owners.md if you want to be subscribed.

  4. added a commit that references this issue on Sep 12, 2026
    0fd08c8
  5. EgorBo commented on Sep 18, 2026

    @EgorBo
    MemberAuthor

    Affected SDK versions:

    • 11.0.100-rc.2.26467.112
  6. added a commit that references this issue on Sep 18, 2026
    ae5f56e
  7. EgorBo commented on Sep 18, 2026

    @EgorBo
    MemberAuthor

    @tannergooding would you consider backporting the fix from #133709 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.

  8. added a commit that references this issue on Sep 20, 2026
    2ec319b
  9. locked and limited conversation to collaborators on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions