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

VectorConvert_r_Target_64Bit and VectorConvert_ro_Target_64Bit fail with LLVM 14 #75359

Open
Tracked by #75757
akoeplinger opened this issue Sep 9, 2022 · 3 comments

Comments

@akoeplinger
Copy link
Member

Discovered on #75055

+ dotnet /datadisks/disk1/work/A650097C/p/xunit/xunit.console.dll JIT/SIMD/JIT.SIMD.XUnitWrapper.dll JIT/Intrinsics/JIT.Intrinsics.XUnitWrapper.dll -parallel collections -nocolor -noshadow -xml testResults.xml
Microsoft.DotNet.XUnitConsoleRunner v2.5.0 (64-bit .NET 7.0.0-preview.7.22375.6)
  Discovering: JIT.SIMD.XUnitWrapper (method display = ClassAndMethod, method display options = None)
  Discovered:  JIT.SIMD.XUnitWrapper (found 99 test cases)
  Starting:    JIT.SIMD.XUnitWrapper (parallel test collections = on, max threads = 2)
    JIT/SIMD/VectorConvert_r_Target_64Bit/VectorConvert_r_Target_64Bit.sh [FAIL]
      
      Return code:      1
      Raw output file:      /datadisks/disk1/work/A650097C/w/B0510920/uploads/Reports/JIT.SIMD/VectorConvert_r_Target_64Bit/VectorConvert_r_Target_64Bit.output.txt
      Raw output:
      BEGIN EXECUTION
      /datadisks/disk1/work/A650097C/p/corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false VectorConvert_r_Target_64Bit.dll ''
      A[1] = -7.76248910142792E+18, B[1] = 10684254972281631744, C[1] = 1.0684254972281633E+19, uint64Val = 10684254972281631744, cvtDblVal = 1.068425497228163E+19
      Testing Converts between Double and UInt64 failed
      JitLogFile SIMD.log not found.
      JitLog not enabled.
      JitLog not enabled.
      JitLog not enabled.
      JitLog not enabled.
      JitLog not enabled.
      JitLog not enabled.
      Expected: 100
      Actual: 255
      END EXECUTION - FAILED
      Test Harness Exitcode is : 1
      To run the test:
      > set CORE_ROOT=/datadisks/disk1/work/A650097C/p
      > /datadisks/disk1/work/A650097C/w/B0510920/e/JIT/SIMD/VectorConvert_r_Target_64Bit/VectorConvert_r_Target_64Bit.sh
      Expected: True
      Actual:   False
      Stack Trace:
           at JIT_SIMD._VectorConvert_r_Target_64Bit_VectorConvert_r_Target_64Bit_._VectorConvert_r_Target_64Bit_VectorConvert_r_Target_64Bit_sh()
           at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
           at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
      Output:
        
        Return code:      1
        Raw output file:      /datadisks/disk1/work/A650097C/w/B0510920/uploads/Reports/JIT.SIMD/VectorConvert_r_Target_64Bit/VectorConvert_r_Target_64Bit.output.txt
        Raw output:
        BEGIN EXECUTION
        /datadisks/disk1/work/A650097C/p/corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false VectorConvert_r_Target_64Bit.dll ''
        A[1] = -7.76248910142792E+18, B[1] = 10684254972281631744, C[1] = 1.0684254972281633E+19, uint64Val = 10684254972281631744, cvtDblVal = 1.068425497228163E+19
        Testing Converts between Double and UInt64 failed
        JitLogFile SIMD.log not found.
        JitLog not enabled.
        JitLog not enabled.
        JitLog not enabled.
        JitLog not enabled.
        JitLog not enabled.
        JitLog not enabled.
        Expected: 100
        Actual: 255
        END EXECUTION - FAILED
        Test Harness Exitcode is : 1
        To run the test:
        > set CORE_ROOT=/datadisks/disk1/work/A650097C/p
        > /datadisks/disk1/work/A650097C/w/B0510920/e/JIT/SIMD/VectorConvert_r_Target_64Bit/VectorConvert_r_Target_64Bit.sh
    JIT/SIMD/VectorConvert_ro_Target_64Bit/VectorConvert_ro_Target_64Bit.sh [FAIL]
      
      Return code:      1
      Raw output file:      /datadisks/disk1/work/A650097C/w/B0510920/uploads/Reports/JIT.SIMD/VectorConvert_ro_Target_64Bit/VectorConvert_ro_Target_64Bit.output.txt
      Raw output:
      BEGIN EXECUTION
      /datadisks/disk1/work/A650097C/p/corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false VectorConvert_ro_Target_64Bit.dll ''
      A[1] = -7.76248910142792E+18, B[1] = 10684254972281631744, C[1] = 1.0684254972281633E+19, uint64Val = 10684254972281631744, cvtDblVal = 1.068425497228163E+19
      Testing Converts between Double and UInt64 failed
      JitLogFile SIMD.log not found.
      JitLog not enabled.
      JitLog not enabled.
      JitLog not enabled.
      JitLog not enabled.
      JitLog not enabled.
      JitLog not enabled.
      Expected: 100
      Actual: 255
      END EXECUTION - FAILED
      Test Harness Exitcode is : 1
      To run the test:
      > set CORE_ROOT=/datadisks/disk1/work/A650097C/p
      > /datadisks/disk1/work/A650097C/w/B0510920/e/JIT/SIMD/VectorConvert_ro_Target_64Bit/VectorConvert_ro_Target_64Bit.sh
      Expected: True
      Actual:   False
      Stack Trace:
           at JIT_SIMD._VectorConvert_ro_Target_64Bit_VectorConvert_ro_Target_64Bit_._VectorConvert_ro_Target_64Bit_VectorConvert_ro_Target_64Bit_sh()
           at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
           at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
      Output:
        
        Return code:      1
        Raw output file:      /datadisks/disk1/work/A650097C/w/B0510920/uploads/Reports/JIT.SIMD/VectorConvert_ro_Target_64Bit/VectorConvert_ro_Target_64Bit.output.txt
        Raw output:
        BEGIN EXECUTION
        /datadisks/disk1/work/A650097C/p/corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false VectorConvert_ro_Target_64Bit.dll ''
        A[1] = -7.76248910142792E+18, B[1] = 10684254972281631744, C[1] = 1.0684254972281633E+19, uint64Val = 10684254972281631744, cvtDblVal = 1.068425497228163E+19
        Testing Converts between Double and UInt64 failed
        JitLogFile SIMD.log not found.
        JitLog not enabled.
        JitLog not enabled.
        JitLog not enabled.
        JitLog not enabled.
        JitLog not enabled.
        JitLog not enabled.
        Expected: 100
        Actual: 255
        END EXECUTION - FAILED
        Test Harness Exitcode is : 1
        To run the test:
        > set CORE_ROOT=/datadisks/disk1/work/A650097C/p
        > /datadisks/disk1/work/A650097C/w/B0510920/e/JIT/SIMD/VectorConvert_ro_Target_64Bit/VectorConvert_ro_Target_64Bit.sh
  Finished:    JIT.SIMD.XUnitWrapper
  Discovering: JIT.Intrinsics.XUnitWrapper (method display = ClassAndMethod, method display options = None)
  Discovered:  JIT.Intrinsics.XUnitWrapper (found 27 test cases)
  Starting:    JIT.Intrinsics.XUnitWrapper (parallel test collections = on, max threads = 2)
  Finished:    JIT.Intrinsics.XUnitWrapper
=== TEST EXECUTION SUMMARY ===
   JIT.Intrinsics.XUnitWrapper  Total:  27, Errors: 0, Failed: 0, Skipped: 0, Time: 1.504s
   JIT.SIMD.XUnitWrapper        Total:  99, Errors: 0, Failed: 2, Skipped: 0, Time: 8.066s
                                       ---          -          -           -        ------
                          GRAND TOTAL: 126          0          2           0        9.570s (9.658s)

from here

public static int VectorConvertDoubleUInt64(Vector<Double> A)
{
Vector<UInt64> B = Vector.ConvertToUInt64(A);
Vector<Double> C = Vector.ConvertToDouble(B);
int returnVal = Pass;
for (int i = 0; i < Vector<Double>.Count; i++)
{
UInt64 uint64Val = (UInt64)A[i];
Double cvtDblVal = (Double)uint64Val;
if ((B[i] != uint64Val) || (C[i] != cvtDblVal))
{
Console.WriteLine("A[{0}] = {1}, B[{0}] = {2}, C[{0}] = {3}, uint64Val = {4}, cvtDblVal = {5}",
i, A[i], B[i], C[i], uint64Val, cvtDblVal);
returnVal = Fail;
}
}
return returnVal;
}

@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 Sep 9, 2022
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Sep 9, 2022
@ghost
Copy link

ghost commented Sep 9, 2022

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

Issue Details

Discovered on #75055

+ dotnet /datadisks/disk1/work/A650097C/p/xunit/xunit.console.dll JIT/SIMD/JIT.SIMD.XUnitWrapper.dll JIT/Intrinsics/JIT.Intrinsics.XUnitWrapper.dll -parallel collections -nocolor -noshadow -xml testResults.xml
Microsoft.DotNet.XUnitConsoleRunner v2.5.0 (64-bit .NET 7.0.0-preview.7.22375.6)
  Discovering: JIT.SIMD.XUnitWrapper (method display = ClassAndMethod, method display options = None)
  Discovered:  JIT.SIMD.XUnitWrapper (found 99 test cases)
  Starting:    JIT.SIMD.XUnitWrapper (parallel test collections = on, max threads = 2)
    JIT/SIMD/VectorConvert_r_Target_64Bit/VectorConvert_r_Target_64Bit.sh [FAIL]
      
      Return code:      1
      Raw output file:      /datadisks/disk1/work/A650097C/w/B0510920/uploads/Reports/JIT.SIMD/VectorConvert_r_Target_64Bit/VectorConvert_r_Target_64Bit.output.txt
      Raw output:
      BEGIN EXECUTION
      /datadisks/disk1/work/A650097C/p/corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false VectorConvert_r_Target_64Bit.dll ''
      A[1] = -7.76248910142792E+18, B[1] = 10684254972281631744, C[1] = 1.0684254972281633E+19, uint64Val = 10684254972281631744, cvtDblVal = 1.068425497228163E+19
      Testing Converts between Double and UInt64 failed
      JitLogFile SIMD.log not found.
      JitLog not enabled.
      JitLog not enabled.
      JitLog not enabled.
      JitLog not enabled.
      JitLog not enabled.
      JitLog not enabled.
      Expected: 100
      Actual: 255
      END EXECUTION - FAILED
      Test Harness Exitcode is : 1
      To run the test:
      > set CORE_ROOT=/datadisks/disk1/work/A650097C/p
      > /datadisks/disk1/work/A650097C/w/B0510920/e/JIT/SIMD/VectorConvert_r_Target_64Bit/VectorConvert_r_Target_64Bit.sh
      Expected: True
      Actual:   False
      Stack Trace:
           at JIT_SIMD._VectorConvert_r_Target_64Bit_VectorConvert_r_Target_64Bit_._VectorConvert_r_Target_64Bit_VectorConvert_r_Target_64Bit_sh()
           at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
           at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
      Output:
        
        Return code:      1
        Raw output file:      /datadisks/disk1/work/A650097C/w/B0510920/uploads/Reports/JIT.SIMD/VectorConvert_r_Target_64Bit/VectorConvert_r_Target_64Bit.output.txt
        Raw output:
        BEGIN EXECUTION
        /datadisks/disk1/work/A650097C/p/corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false VectorConvert_r_Target_64Bit.dll ''
        A[1] = -7.76248910142792E+18, B[1] = 10684254972281631744, C[1] = 1.0684254972281633E+19, uint64Val = 10684254972281631744, cvtDblVal = 1.068425497228163E+19
        Testing Converts between Double and UInt64 failed
        JitLogFile SIMD.log not found.
        JitLog not enabled.
        JitLog not enabled.
        JitLog not enabled.
        JitLog not enabled.
        JitLog not enabled.
        JitLog not enabled.
        Expected: 100
        Actual: 255
        END EXECUTION - FAILED
        Test Harness Exitcode is : 1
        To run the test:
        > set CORE_ROOT=/datadisks/disk1/work/A650097C/p
        > /datadisks/disk1/work/A650097C/w/B0510920/e/JIT/SIMD/VectorConvert_r_Target_64Bit/VectorConvert_r_Target_64Bit.sh
    JIT/SIMD/VectorConvert_ro_Target_64Bit/VectorConvert_ro_Target_64Bit.sh [FAIL]
      
      Return code:      1
      Raw output file:      /datadisks/disk1/work/A650097C/w/B0510920/uploads/Reports/JIT.SIMD/VectorConvert_ro_Target_64Bit/VectorConvert_ro_Target_64Bit.output.txt
      Raw output:
      BEGIN EXECUTION
      /datadisks/disk1/work/A650097C/p/corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false VectorConvert_ro_Target_64Bit.dll ''
      A[1] = -7.76248910142792E+18, B[1] = 10684254972281631744, C[1] = 1.0684254972281633E+19, uint64Val = 10684254972281631744, cvtDblVal = 1.068425497228163E+19
      Testing Converts between Double and UInt64 failed
      JitLogFile SIMD.log not found.
      JitLog not enabled.
      JitLog not enabled.
      JitLog not enabled.
      JitLog not enabled.
      JitLog not enabled.
      JitLog not enabled.
      Expected: 100
      Actual: 255
      END EXECUTION - FAILED
      Test Harness Exitcode is : 1
      To run the test:
      > set CORE_ROOT=/datadisks/disk1/work/A650097C/p
      > /datadisks/disk1/work/A650097C/w/B0510920/e/JIT/SIMD/VectorConvert_ro_Target_64Bit/VectorConvert_ro_Target_64Bit.sh
      Expected: True
      Actual:   False
      Stack Trace:
           at JIT_SIMD._VectorConvert_ro_Target_64Bit_VectorConvert_ro_Target_64Bit_._VectorConvert_ro_Target_64Bit_VectorConvert_ro_Target_64Bit_sh()
           at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
           at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
      Output:
        
        Return code:      1
        Raw output file:      /datadisks/disk1/work/A650097C/w/B0510920/uploads/Reports/JIT.SIMD/VectorConvert_ro_Target_64Bit/VectorConvert_ro_Target_64Bit.output.txt
        Raw output:
        BEGIN EXECUTION
        /datadisks/disk1/work/A650097C/p/corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false VectorConvert_ro_Target_64Bit.dll ''
        A[1] = -7.76248910142792E+18, B[1] = 10684254972281631744, C[1] = 1.0684254972281633E+19, uint64Val = 10684254972281631744, cvtDblVal = 1.068425497228163E+19
        Testing Converts between Double and UInt64 failed
        JitLogFile SIMD.log not found.
        JitLog not enabled.
        JitLog not enabled.
        JitLog not enabled.
        JitLog not enabled.
        JitLog not enabled.
        JitLog not enabled.
        Expected: 100
        Actual: 255
        END EXECUTION - FAILED
        Test Harness Exitcode is : 1
        To run the test:
        > set CORE_ROOT=/datadisks/disk1/work/A650097C/p
        > /datadisks/disk1/work/A650097C/w/B0510920/e/JIT/SIMD/VectorConvert_ro_Target_64Bit/VectorConvert_ro_Target_64Bit.sh
  Finished:    JIT.SIMD.XUnitWrapper
  Discovering: JIT.Intrinsics.XUnitWrapper (method display = ClassAndMethod, method display options = None)
  Discovered:  JIT.Intrinsics.XUnitWrapper (found 27 test cases)
  Starting:    JIT.Intrinsics.XUnitWrapper (parallel test collections = on, max threads = 2)
  Finished:    JIT.Intrinsics.XUnitWrapper
=== TEST EXECUTION SUMMARY ===
   JIT.Intrinsics.XUnitWrapper  Total:  27, Errors: 0, Failed: 0, Skipped: 0, Time: 1.504s
   JIT.SIMD.XUnitWrapper        Total:  99, Errors: 0, Failed: 2, Skipped: 0, Time: 8.066s
                                       ---          -          -           -        ------
                          GRAND TOTAL: 126          0          2           0        9.570s (9.658s)

from here

public static int VectorConvertDoubleUInt64(Vector<Double> A)
{
Vector<UInt64> B = Vector.ConvertToUInt64(A);
Vector<Double> C = Vector.ConvertToDouble(B);
int returnVal = Pass;
for (int i = 0; i < Vector<Double>.Count; i++)
{
UInt64 uint64Val = (UInt64)A[i];
Double cvtDblVal = (Double)uint64Val;
if ((B[i] != uint64Val) || (C[i] != cvtDblVal))
{
Console.WriteLine("A[{0}] = {1}, B[{0}] = {2}, C[{0}] = {3}, uint64Val = {4}, cvtDblVal = {5}",
i, A[i], B[i], C[i], uint64Val, cvtDblVal);
returnVal = Fail;
}
}
return returnVal;
}

Author: akoeplinger
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@akoeplinger akoeplinger added area-Codegen-LLVM-mono and removed area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI untriaged New issue has not been triaged by the area owner labels Sep 9, 2022
@akoeplinger akoeplinger added this to the 8.0.0 milestone Sep 9, 2022
@SamMonoRT
Copy link
Member

@akoeplinger - Do these fail with LLVM16 (we updated to that right?) (Moving to 9.0, but if needed will consider backporting the fix)

@SamMonoRT SamMonoRT modified the milestones: 8.0.0, 9.0.0 Jul 25, 2023
@akoeplinger
Copy link
Member Author

Yes we're on LLVM16 but the tests are disabled in src/tests/issues.targets so they'd need to be reenabled to check whether they still fail.

@steveisok steveisok modified the milestones: 9.0.0, Future Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants