Skip to content

Instantly share code, notes, and snippets.

@fables-tales
Created July 22, 2010 14:29
Show Gist options
  • Save fables-tales/486041 to your computer and use it in GitHub Desktop.
Save fables-tales/486041 to your computer and use it in GitHub Desktop.
; ModuleID = 'ponies.ll'
@values = internal global [8192 x i32] zeroinitializer ; <[8192 x i32]*> [#us
define i32 @main() nounwind {
entry:
%dereference1 = load i32* getelementptr inbounds ([8192 x i32]* @values, i3
%inc3 = add i32 %dereference1, 3 ; <i32> [#uses=3]
store i32 %inc3, i32* getelementptr inbounds ([8192 x i32]* @values, i32 0,
%cond = icmp eq i32 %inc3, 10 ; <i1> [#uses=1]
%merge = select i1 %cond, i32 %inc3, i32 1 ; <i32> [#uses=1]
ret i32 %merge
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment