-
-
Save antonijn/eada506ff88f512b9a8d to your computer and use it in GitHub Desktop.
This file contains 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
int main(void) | |
{ | |
int i; | |
for (i = 0; i < 10; ++i) | |
; | |
return i; | |
} |
This file contains 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
%0: | |
%1 = (ptr int) alloca int #phiable() | |
store int 0, (ptr int) %1 | |
jmp block %2 | |
%2: | |
%3 = int load (ptr int) %1 | |
%4 = _Bool cmp lt int %3, int 10 | |
split _Bool %4, block %5, block %10 | |
%5: | |
jmp block %7 | |
%7: | |
%8 = int load (ptr int) %1 | |
%9 = int add int %8, int 1 | |
store int %9, (ptr int) %1 | |
jmp block %2 | |
%10: | |
%11 = int load (ptr int) %1 | |
ret int %11 |
This file contains 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
%0: | |
jmp block %2 | |
%2: | |
%3 = int phi block %0, int 0, block %7, int %8 | |
%4 = _Bool cmp lt int %3, int 10 | |
split _Bool %4, block %5, block %9 | |
%5: | |
jmp block %7 | |
%7: | |
%8 = int add int %3, int 1 | |
jmp block %2 | |
%9: | |
ret int %3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment