Created
September 9, 2010 10:15
-
-
Save GiorgioRegni/571686 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
| ; LOOP for(t=0; t<max, t++) | |
| store i32 0, i32* %t.addr | |
| br label %loop_over_t | |
| loop_over_t: | |
| %t = load i32* %t.addr ; %t contains the loop counter current value | |
| ; ... DO SOME WORK ... | |
| ; increment t and loop | |
| %t_plus_1 = add i32 1, %t | |
| store i32 %t_plus_1, i32* %t.addr | |
| %cond_max_loop_reached = icmp eq i32 %tp1, %max ; (t<max ?) | |
| br i1 %cond_max_loop_reached, label %max_reached, label %setup_next_loop ; loop if t < max | |
| max_reached: | |
| ; LOOP IS OVER |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment