Skip to content

Instantly share code, notes, and snippets.

@Preetam
Created September 16, 2013 16:19
Show Gist options
  • Save Preetam/6582898 to your computer and use it in GitHub Desktop.
Save Preetam/6582898 to your computer and use it in GitHub Desktop.
define i32 @mul_add(i32 %x, i32 %y, i32 %z) {
entry:
%tmp = mul i32 %x, %y
%tmp2 = add i32 %tmp, %z
ret i32 %tmp2
}
define i32 @main() {
%tmp = call i32 @mul_add(i32 2, i32 2, i32 4)
ret i32 %tmp
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment