Created
October 15, 2013 21:22
-
-
Save zain/6998875 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # i added this test | |
| def test_int_add_ovf_commutative(self): | |
| ops = """ | |
| [i0, i1] | |
| i2 = int_add_ovf(i0, i1) | |
| i3 = int_add_ovf(i1, i0) | |
| jump(i2, i3) | |
| """ | |
| expected = """ | |
| [i0, i1] | |
| i2 = int_add_ovf(i0, i1) | |
| jump(i2, i2) | |
| """ | |
| self.optimize_loop(ops, expected) | |
| # it fails because ops are actually: | |
| (Pdb) print '\n'.join([str(o) for o in loop.operations]) | |
| label(i0, i1, descr=<rpython.jit.metainterp.history.TargetToken object at 0x000000010633c528>) | |
| i3 = int_add_ovf(i1, i0) | |
| jump(i2, i3, descr=<rpython.jit.metainterp.history.TargetToken object at 0x000000010633c528>) |
Author
zain
commented
Oct 15, 2013
Author
(Pdb) print '\n'.join([str(o) for o in loop.operations])
label(i0, i1, descr=<rpython.jit.metainterp.history.TargetToken object at 0x000000010633c528>)
i3 = int_add_ovf(i1, i0)
jump(i2, i3, descr=<rpython.jit.metainterp.history.TargetToken object at 0x000000010633c528>)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment