Skip to content

Instantly share code, notes, and snippets.

@jasonmc
Created November 14, 2008 21:40
Show Gist options
  • Save jasonmc/25102 to your computer and use it in GitHub Desktop.
Save jasonmc/25102 to your computer and use it in GitHub Desktop.
; ModuleID = 'test1.o'
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
target triple = "x86_64-unknown-linux-gnu"
define i32 @main() {
entry:
%retval = alloca i32 ; <i32*> [#uses=2]
%z = alloca i32 ; <i32*> [#uses=2]
%y = alloca i32 ; <i32*> [#uses=1]
%x = alloca i32 ; <i32*> [#uses=2]
%tmp = alloca i32 ; <i32*> [#uses=2]
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
store i32 5, i32* %x, align 4
store i32 16777216, i32* %z, align 4
%tmp1 = load i32* %x, align 4 ; <i32> [#uses=1]
%tmp2 = load i32* %z, align 4 ; <i32> [#uses=1]
%tmp3 = add i32 %tmp1, %tmp2 ; <i32> [#uses=1]
store i32 %tmp3, i32* %y, align 4
store i32 0, i32* %tmp, align 4
%tmp4 = load i32* %tmp, align 4 ; <i32> [#uses=1]
store i32 %tmp4, i32* %retval, align 4
br label %return
return: ; preds = %entry
%retval5 = load i32* %retval ; <i32> [#uses=1]
ret i32 %retval5
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment