summaryrefslogtreecommitdiff
path: root/tests/src/JIT/Regression/JitBlue/GitHub_6239/GitHub_6239.cs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/JIT/Regression/JitBlue/GitHub_6239/GitHub_6239.cs')
-rw-r--r--tests/src/JIT/Regression/JitBlue/GitHub_6239/GitHub_6239.cs46
1 files changed, 46 insertions, 0 deletions
diff --git a/tests/src/JIT/Regression/JitBlue/GitHub_6239/GitHub_6239.cs b/tests/src/JIT/Regression/JitBlue/GitHub_6239/GitHub_6239.cs
new file mode 100644
index 0000000000..3a57e4d594
--- /dev/null
+++ b/tests/src/JIT/Regression/JitBlue/GitHub_6239/GitHub_6239.cs
@@ -0,0 +1,46 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+// This test tests our signed uncontained compare logic
+// We should generate a signed jump for the high compare, and an unsigned
+// jump for the low compare.
+//
+
+using System;
+using System.Runtime.CompilerServices;
+
+class Program
+{
+ uint i;
+
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static int Test(long a, long b)
+ {
+ if (a < b)
+ {
+ return 5;
+ }
+ else
+ {
+ return 0;
+ }
+ }
+
+ static int Main()
+ {
+ const int Pass = 100;
+ const int Fail = -1;
+
+ if (Test(-2147483649L, -2147483648L) == 5)
+ {
+ Console.WriteLine("Passed");
+ return Pass;
+ }
+ else
+ {
+ Console.WriteLine("Failed");
+ return Fail;
+ }
+ }
+}