Skip to content

JIT: Invalid result with negated op in compare on arm64 #85225

Closed

Description

@jakobbotsch
// Generated by Fuzzlyn v1.5 on 2023-04-23 16:11:05
// Run on Arm64 Linux
// Seed: 17525435962662079854
// Reduced from 204.8 KiB to 0.2 KiB in 00:02:20
// Debug: Prints 0 line(s)
// Release: Prints 1 line(s)
public class Program
{
    public static uint s_2;
    public static void Main()
    {
        int vr0 = default(int);
        if (56058 < (uint)(-s_2))
        {
            System.Console.WriteLine(vr0);
        }
    }
}

cc @TIHan, related to #84667?

Activity

  1. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Apr 23, 2023
  2. ghost added
    area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
    on Apr 23, 2023
  3. jakobbotsch commented on Apr 23, 2023

    @jakobbotsch
    MemberAuthor

    There are also quite a few assertion failures:

    // Generated by Fuzzlyn v1.5 on 2023-04-23 16:08:36
    // Run on Arm64 Linux
    // Seed: 14539137576033306350
    // Reduced from 132.6 KiB to 0.2 KiB in 00:00:48
    // Hits JIT assert in Release:
    // Assertion failed 'op2->gtGetOp1()->isContained()' in 'Program:Main(Fuzzlyn.ExecutionServer.IRuntime)' during 'Generate code' (IL size 36; hash 0xade6b36b; FullOpts)
    // 
    //     File: /__w/1/s/src/coreclr/jit/codegenarm64.cpp Line: 4581
    // 
    public class C0
    {
        public bool F8;
    }
    
    public class Program
    {
        public static C0 s_11;
        public static byte s_35;
        public static sbyte s_44;
        public static void Main()
        {
            s_11.F8 |= s_35 < (-(1 << s_44));
        }
    }
    // Generated by Fuzzlyn v1.5 on 2023-04-23 15:24:06
    // Run on Arm64 MacOS
    // Seed: 17107947400844937226
    // Reduced from 42.1 KiB to 0.5 KiB in 00:00:16
    // Hits JIT assert in Release:
    // Assertion failed 'ins == INS_cmp' in 'Program:M17(long)' during 'Generate code' (IL size 32; hash 0x81994f2b; FullOpts)
    // 
    //     File: /Users/runner/work/1/s/src/coreclr/jit/codegenarm64.cpp Line: 4568
    // 
    public class Program
    {
        public static IRuntime s_rt;
        public static uint s_4;
        public static void Main()
        {
            M17(0);
        }
    
        public static void M17(long arg0)
        {
            short var0 = default(short);
            if ((ulong)((-s_4) & arg0) >= 1)
            {
                s_rt.WriteLine(var0);
            }
        }
    }
  4. self-assigned this
    on Apr 23, 2023
  5. TIHan commented on Apr 23, 2023

    @TIHan
    Contributor

    Yea, it looks related.

  6. ghost added
    in-prThere is an active PR which will close this issue when it is merged
    on Apr 24, 2023
  7. ghost removed
    in-prThere is an active PR which will close this issue when it is merged
    on Apr 26, 2023
  8. ghost removed
    untriagedNew issue has not been triaged by the area owner
    on Apr 26, 2023
  9. ghost locked as resolved and limited conversation to collaborators on May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions