diff graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/optimize/InferStamp01.java @ 10603:2e7e7a22940f

RightShiftNode: fix canonicalization for negative input
author Bernhard Urban <bernhard.urban@jku.at>
date Mon, 01 Jul 2013 23:50:27 +0200
parents 97d280a879ff
children 64dcb92ee75a
line wrap: on
line diff
--- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/optimize/InferStamp01.java	Tue Jul 02 19:21:59 2013 +0200
+++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/optimize/InferStamp01.java	Mon Jul 01 23:50:27 2013 +0200
@@ -43,6 +43,11 @@
         runTest("testi0", 0x7788_99aa);
     }
 
+    @Test
+    public void runi0neg() throws Throwable {
+        runTest("testi0", 0xf788_99aa);
+    }
+
     public static int testi1(int arg) {
         int a = arg;
         for (int i = 0; i < 2; i++) {
@@ -56,6 +61,11 @@
         runTest("testi1", 0x7788_99aa);
     }
 
+    @Test
+    public void runi1neg() throws Throwable {
+        runTest("testi1", 0xf788_99aa);
+    }
+
     public static int testi2(int arg) {
         int a = arg;
         for (int i = 0; i < 2; i++) {
@@ -69,6 +79,11 @@
         runTest("testi2", 0x7788_99aa);
     }
 
+    @Test
+    public void runi2neg() throws Throwable {
+        runTest("testi2", 0xf788_99aa);
+    }
+
     public static long testl0(long arg) {
         long a = arg;
         for (long i = 0; i < 2; i++) {
@@ -82,6 +97,11 @@
         runTest("testl0", 0x3344_5566_7788_99aaL);
     }
 
+    @Test
+    public void runl0neg() throws Throwable {
+        runTest("testl0", 0xf344_5566_7788_99aaL);
+    }
+
     public static long testl1(long arg) {
         long a = arg;
         for (long i = 0; i < 2; i++) {
@@ -95,6 +115,11 @@
         runTest("testl1", 0x3344_5566_7788_99aaL);
     }
 
+    @Test
+    public void runl1neg() throws Throwable {
+        runTest("testl1", 0xf344_5566_7788_99aaL);
+    }
+
     public static long testl2(long arg) {
         long a = arg;
         for (long i = 0; i < 2; i++) {
@@ -107,4 +132,9 @@
     public void runl2() throws Throwable {
         runTest("testl2", 0x3344_5566_7788_99aaL);
     }
+
+    @Test
+    public void runl2neg() throws Throwable {
+        runTest("testl2", 0xf344_5566_7788_99aaL);
+    }
 }