Commits

Lars Wassermann committed 844a975

(cfbolz, lwassermann): a skipped test that would be really useful for the traces in the Smalltalk VM

Comments (0)

Files changed (1)

rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py

         """
         self.optimize_loop(ops, expected)
 
+    def test_add_sub_ovf_second_operation_regular(self):
+	py.test.skip("Smalltalk would like this to pass")
+	# This situation occurs in Smalltalk because it uses 1-based indexing.
+	# The below code is equivalent to a loop over an array.
+        ops = """
+        [i1]
+        i2 = int_sub(i1, 1)
+        escape(i2)
+        i3 = int_add_ovf(i1, 1)
+        guard_no_overflow() []
+        jump(i3)
+        """
+        preamble = """
+        [i1]
+        i2 = int_sub(i1, 1)
+        escape(i2)
+        i3 = int_add_ovf(i1, 1)
+        guard_no_overflow() []
+        jump(i3, i1)
+        """
+        expected = """
+        [i1, i2]
+        escape(i2)
+        i3 = int_add_ovf(i1, 1)
+        guard_no_overflow() []
+        jump(i3, i1)
+        """
+        self.optimize_loop(ops, expected, preamble)
+
     def test_add_sub_ovf_virtual_unroll(self):
         ops = """
         [p15]
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.