Skip to content

Conversation

@radekdoulik
Copy link
Member

C# code

iv = Vector128.Abs(Vector128.Create(System.Random.Shared.Next()));
fv = Vector128.Abs(Vector128.Create(System.Random.Shared.NextSingle()));
dv = Vector128.Abs(Vector128.Create(System.Random.Shared.NextDouble()));

is emitted as:

...
i32x4.splat    [SIMD]
i32x4.abs    [SIMD]
v128.store offset:16    [SIMD]
...
f32x4.splat    [SIMD]
f32x4.abs    [SIMD]
v128.store    [SIMD]
...
f64x2.splat    [SIMD]
f64x2.abs    [SIMD]
v128.store offset:80    [SIMD]
...

C# code

    iv = Vector128.Abs(Vector128.Create(System.Random.Shared.Next()));
    fv = Vector128.Abs(Vector128.Create(System.Random.Shared.NextSingle()));
    dv = Vector128.Abs(Vector128.Create(System.Random.Shared.NextDouble()));

is emitted as:

    ...
    i32x4.splat    [SIMD]
    i32x4.abs    [SIMD]
    v128.store offset:16    [SIMD]
    ...
    f32x4.splat    [SIMD]
    f32x4.abs    [SIMD]
    v128.store    [SIMD]
    ...
    f64x2.splat    [SIMD]
    f64x2.abs    [SIMD]
    v128.store offset:80    [SIMD]
    ...
@radekdoulik radekdoulik added this to the 8.0.0 milestone Nov 8, 2022
@radekdoulik
Copy link
Member Author

The build failures happen on main too, unrelated.

@radekdoulik radekdoulik merged commit 4793d91 into dotnet:main Nov 9, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants