Skip to content

Test failure JIT/SIMD/VectorAdd_ro/VectorAdd_ro #87116

Closed

Description

@v-wenyuxu

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&)

Activity

  1. added
    os-linux
    blocking-outerloop
    on Jun 5, 2023
  2. ghost added
    untriaged
    on Jun 5, 2023
  3. ghost added
    area-CodeGen-coreclr
    on Jun 5, 2023
  4. markples commented on Jun 5, 2023

    @markples
    Contributor

    @tannergooding Is this caused by #84821?

  5. tannergooding commented on Jun 5, 2023

    @tannergooding
    Member

    Possibly. CC @dotnet/avx512-contrib

    Will take a look.

  6. tannergooding commented on Jun 5, 2023

    @tannergooding
    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
  7. ghost added
    in-pr
    on Jun 5, 2023
  8. added this to the 8.0.0 milestone on Jun 5, 2023
  9. ghost removed
    untriaged
    on Jun 5, 2023
  10. ghost removed
    in-pr
    on Jun 6, 2023
  11. ghost added
    in-pr
    on Jun 6, 2023
  12. ghost removed
    in-pr
    on Jun 7, 2023
  13. ghost locked as resolved and limited conversation to collaborators on Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

arch-x64arch-x86area-CodeGen-coreclrblocking-outerloopos-linuxos-windows

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions