All pastes #615159 Raw Edit

Untitled

public text v1 · immutable
·published 2007-07-11 23:29 UTC
rendered paste body
; ModuleID = 'b'
@stringliteral = internal constant [13 x i8] c"hello world\0A\00"               ; <[13 x i8]*> [#uses=1]

define fastcc void @_D1b1fFZv() {
entry:
        %tmp = getelementptr [13 x i8]* @stringliteral, i32 0, i32 0            ; <i8*> [#uses=1]
        %tmp1 = call i32 (i8*, ...)* @printf( i8* %tmp )                ; <i32> [#uses=0]
        ret void
}

declare i32 @printf(i8*, ...)

define fastcc i32 @_Dmain() {
entry:
        %i = alloca i1          ; <i1*> [#uses=2]
        store i1 true, i1* %i
        %tmp = load i1* %i              ; <i1> [#uses=1]
        %tmp1 = sext i1 %tmp to i32             ; <i32> [#uses=1]
        %tmp2 = icmp eq i32 %tmp1, 1            ; <i1> [#uses=1]
@        br i1 %tmp2, label %if, label %endif

if:             ; preds = %entry
        call fastcc void @_D1b1fFZv( )
        br label %endif

endif:          ; preds = %if, %entry
        ret i32 0
}

define i32 @main(i32, i8**, i8**) {
entry:
        %ret = call fastcc i32 @_Dmain( )               ; <i32> [#uses=1]
        ret i32 %ret
}