changeset 11:d47796d3a928

generator: remove the tests with unmatched loads
author shade
date Mon, 08 Jul 2013 19:50:17 +0400
parents cfd4b1ee9140
children d437d8087b3a
files generator/src/main/java/org/openjdk/jcstress/tracer/TraceGen.java
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/generator/src/main/java/org/openjdk/jcstress/tracer/TraceGen.java	Mon Jul 08 19:43:03 2013 +0400
+++ b/generator/src/main/java/org/openjdk/jcstress/tracer/TraceGen.java	Mon Jul 08 19:50:17 2013 +0400
@@ -73,6 +73,7 @@
         for (Trace trace : allTraces) {
             if (!trace.hasLoads()) continue;
             if (!trace.hasStores()) continue;
+            if (trace.hasNonMatchingLoads()) continue;
             if (trace.hasNonMatchingStores()) continue;
 
             int constId = 0;
@@ -385,11 +386,11 @@
             for (Op op : ops) {
                 if (op.getType() == Op.Type.LOAD) {
                     if (!stores.contains(op.getVarId()))
-                        return false;
+                        return true;
                 }
             }
 
-            return true;
+            return false;
         }
 
         public boolean hasNonMatchingStores() {
@@ -403,11 +404,11 @@
             for (Op op : ops) {
                 if (op.getType() == Op.Type.STORE) {
                     if (!loads.contains(op.getVarId()))
-                        return false;
+                        return true;
                 }
             }
 
-            return true;
+            return false;
         }
     }