Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failure JIT/SIMD/VectorAdd_ro/VectorAdd_ro #87116

Closed
v-wenyuxu opened this issue Jun 5, 2023 · 4 comments · Fixed by #87134
Closed

Test failure JIT/SIMD/VectorAdd_ro/VectorAdd_ro #87116

v-wenyuxu opened this issue Jun 5, 2023 · 4 comments · Fixed by #87134
Assignees
Labels
arch-x64 arch-x86 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI blocking-outerloop Blocking the 'runtime-coreclr outerloop' and 'runtime-libraries-coreclr outerloop' runs os-linux Linux OS (any supported distro) os-windows
Milestone

Comments

@v-wenyuxu
Copy link

Run: runtime-coreclr outerloop 20230604.2

Failed test:

R2R-CG2 linux x64 Checked no_tiered_compilation @ (Alpine.315.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.15-helix-amd64
- JIT/SIMD/VectorAdd_ro/VectorAdd_ro.dll
- JIT/SIMD/VectorHWAccel_ro/VectorHWAccel_ro.dll

R2R-CG2 windows x86 Checked no_tiered_compilation @ Windows.10.Amd64.Open
- JIT/SIMD/VectorAdd_ro/VectorAdd_ro.dll
- JIT/SIMD/VectorHWAccel_ro/VectorHWAccel_ro.dll
- JIT/SIMD/VectorHWAccel2_ro/VectorHWAccel2_ro.dll

R2R-CG2 windows x64 Checked no_tiered_compilation @ Windows.10.Amd64.Open
- JIT/SIMD/VectorAdd_ro/VectorAdd_ro.dll
- JIT/SIMD/VectorHWAccel_ro/VectorHWAccel_ro.dll
- JIT/SIMD/VectorHWAccel2_ro/VectorHWAccel2_ro.dll

R2R-CG2 windows x86 Checked @ Windows.10.Amd64.Open
- JIT/SIMD/VectorAdd_ro/VectorAdd_ro.dll
- JIT/SIMD/VectorHWAccel2_ro/VectorHWAccel2_ro.dll
- JIT/SIMD/VectorHWAccel_ro/VectorHWAccel_ro.dll

R2R-CG2 linux x64 Checked no_tiered_compilation @ Ubuntu.1804.Amd64.Open
- JIT/SIMD/VectorAdd_ro/VectorAdd_ro.dll
- JIT/SIMD/VectorHWAccel_ro/VectorHWAccel_ro.dll

coreclr windows x86 Checked @ Windows.10.Amd64.Open
- JIT/SIMD/VectorAdd_ro/VectorAdd_ro.dll
- JIT/SIMD/VectorHWAccel_ro/VectorHWAccel_ro.dll
- JIT/SIMD/VectorHWAccel2_ro/VectorHWAccel2_ro.dll

Error message:

Assert.Equal() Failure
Expected: 100
Actual:   -1



Stack trace
   at Xunit.Assert.Equal[T](T expected, T actual, IEqualityComparer`1 comparer) in /_/src/xunit.assert/Asserts/EqualityAsserts.cs:line 96
   at Program.<<Main>$>g__TestExecutor58|0_59(StreamWriter tempLogSw, StreamWriter statsCsvSw, <>c__DisplayClass0_0&)
@v-wenyuxu v-wenyuxu added arch-x86 os-linux Linux OS (any supported distro) os-windows arch-x64 blocking-outerloop Blocking the 'runtime-coreclr outerloop' and 'runtime-libraries-coreclr outerloop' runs labels Jun 5, 2023
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Jun 5, 2023
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jun 5, 2023
@ghost
Copy link

ghost commented Jun 5, 2023

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

Issue Details

Run: runtime-coreclr outerloop 20230604.2

Failed test:

R2R-CG2 linux x64 Checked no_tiered_compilation @ (Alpine.315.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.15-helix-amd64
- JIT/SIMD/VectorAdd_ro/VectorAdd_ro.dll
- JIT/SIMD/VectorHWAccel_ro/VectorHWAccel_ro.dll

R2R-CG2 windows x86 Checked no_tiered_compilation @ Windows.10.Amd64.Open
- JIT/SIMD/VectorAdd_ro/VectorAdd_ro.dll
- JIT/SIMD/VectorHWAccel_ro/VectorHWAccel_ro.dll
- JIT/SIMD/VectorHWAccel2_ro/VectorHWAccel2_ro.dll

R2R-CG2 windows x64 Checked no_tiered_compilation @ Windows.10.Amd64.Open
- JIT/SIMD/VectorAdd_ro/VectorAdd_ro.dll
- JIT/SIMD/VectorHWAccel_ro/VectorHWAccel_ro.dll
- JIT/SIMD/VectorHWAccel2_ro/VectorHWAccel2_ro.dll

R2R-CG2 windows x86 Checked @ Windows.10.Amd64.Open
- JIT/SIMD/VectorAdd_ro/VectorAdd_ro.dll
- JIT/SIMD/VectorHWAccel2_ro/VectorHWAccel2_ro.dll
- JIT/SIMD/VectorHWAccel_ro/VectorHWAccel_ro.dll

R2R-CG2 linux x64 Checked no_tiered_compilation @ Ubuntu.1804.Amd64.Open
- JIT/SIMD/VectorAdd_ro/VectorAdd_ro.dll
- JIT/SIMD/VectorHWAccel_ro/VectorHWAccel_ro.dll

coreclr windows x86 Checked @ Windows.10.Amd64.Open
- JIT/SIMD/VectorAdd_ro/VectorAdd_ro.dll
- JIT/SIMD/VectorHWAccel_ro/VectorHWAccel_ro.dll
- JIT/SIMD/VectorHWAccel2_ro/VectorHWAccel2_ro.dll

Error message:

Assert.Equal() Failure
Expected: 100
Actual:   -1



Stack trace
   at Xunit.Assert.Equal[T](T expected, T actual, IEqualityComparer`1 comparer) in /_/src/xunit.assert/Asserts/EqualityAsserts.cs:line 96
   at Program.<<Main>$>g__TestExecutor58|0_59(StreamWriter tempLogSw, StreamWriter statsCsvSw, <>c__DisplayClass0_0&)
Author: v-wenyuxu
Assignees: -
Labels:

arch-x86, os-linux, os-windows, arch-x64, area-CodeGen-coreclr, untriaged, blocking-outerloop

Milestone: -

@markples
Copy link
Contributor

markples commented Jun 5, 2023

@tannergooding Is this caused by #84821?

@tannergooding
Copy link
Member

Possibly. CC @dotnet/avx512-contrib

Will take a look.

@tannergooding
Copy link
Member

Simplified repro is:

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

public class Program
{
    public static int Main()
    {
        return TryVectorAdd(1, 2, 1 + 2) ? 100 : 0;
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    public static bool TryVectorAdd(float a, float b, float c)
    {
        Vector128<float>A = Vector128.Create(a);
        Vector128<float>B = Vector128.Create(b);
        Vector128<float> C = A + B;

        return C == Vector128.Create(c);
    }
}

We emit the following and are missing the embedded broadcast for xmm1:

G_M39597_IG01:              ;; offset=0000H
 C5F877               vzeroupper
                                                ;; size=3 bbWeight=1 PerfScore 1.00
G_M39597_IG02:              ;; offset=0003H
 C4E27918C0           vbroadcastss xmm0, xmm0
 C5F858C1             vaddps   xmm0, xmm0, xmm1
 C4E27918CA           vbroadcastss xmm1, xmm2
 C5F8C2C100           vcmpps   xmm0, xmm0, xmm1, 0
 C5F850C0             vmovmskps rax, xmm0
 83F80F               cmp      eax, 15
 0F94C0               sete     al
; ............................... 32B boundary ...............................
 0FB6C0               movzx    rax, al
                                                ;; size=32 bbWeight=1 PerfScore 11.50
G_M39597_IG03:              ;; offset=0023H
 C3                   ret

tannergooding added a commit to tannergooding/runtime that referenced this issue Jun 5, 2023
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jun 5, 2023
@JulieLeeMSFT JulieLeeMSFT added this to the 8.0.0 milestone Jun 5, 2023
@ghost ghost added in-pr There is an active PR which will close this issue when it is merged and removed untriaged New issue has not been triaged by the area owner in-pr There is an active PR which will close this issue when it is merged labels Jun 5, 2023
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jun 7, 2023
tannergooding added a commit that referenced this issue Jun 7, 2023
* Adding a regression test for #87116

* Ensure IsContainableHWIntrinsicOp takes into account whether CreateScalarUnsafe is coming from memory for embedded broadcast
@ghost ghost locked as resolved and limited conversation to collaborators Jul 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-x64 arch-x86 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI blocking-outerloop Blocking the 'runtime-coreclr outerloop' and 'runtime-libraries-coreclr outerloop' runs os-linux Linux OS (any supported distro) os-windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants