Skip to content

JIT: LowerHWIntrinsicGetElement can reorder trees unsafely #89565

@jakobbotsch

Description

@jakobbotsch

The following example throws ArgumentOutOfRangeException when Vector256 is hardware accelerated, but NullReferenceException when it isn't (DOTNET_EnableAVX=0).

public class Program
{
    public static unsafe void Main()
    {
        Foo(null);
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    private static unsafe float Foo(Vector256<float>* v)
    {
        return (*v)[8];
    }
}

Context: #83005 (comment)

Metadata

Metadata

Assignees

Labels

Priority:2Work that is important, but not critical for the releasearea-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

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions