1 ; RUN: %lli_mcjit -force-interpreter=true %s | grep 1 2 3 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32" 4 target triple = "i686-pc-linux-gnu" 5 @.str = internal constant [10 x i8] c"MSB = %d\0A\00" ; <[10 x i8]*> [#uses=1] 6 7 define i65 @foo(i65 %x) { 8 entry: 9 %x_addr = alloca i65 ; <i65*> [#uses=2] 10 %retval = alloca i65 ; <i65*> [#uses=2] 11 %tmp = alloca i65 ; <i65*> [#uses=2] 12 %"alloca point" = bitcast i65 0 to i65 ; <i65> [#uses=0] 13 store i65 %x, i65* %x_addr 14 %tmp1 = load i65* %x_addr, align 4 ; <i65> [#uses=1] 15 %tmp2 = ashr i65 %tmp1, 65 ; <i65> [#uses=1] 16 store i65 %tmp2, i65* %tmp, align 4 17 %tmp3 = load i65* %tmp, align 4 ; <i65> [#uses=1] 18 store i65 %tmp3, i65* %retval, align 4 19 br label %return 20 21 return: ; preds = %entry 22 %retval4 = load i65* %retval ; <i65> [#uses=1] 23 ret i65 %retval4 24 } 25 26 define i32 @main() { 27 entry: 28 %retval = alloca i32 ; <i32*> [#uses=1] 29 %iftmp.0 = alloca i32 ; <i32*> [#uses=3] 30 %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0] 31 %tmp = call i65 @foo( i65 -9 ) ; <i65> [#uses=1] 32 %tmp1 = lshr i65 %tmp, 64 ; <i65> [#uses=1] 33 %tmp2 = xor i65 %tmp1, 1 ; <i65> [#uses=1] 34 %tmp3 = and i65 %tmp2, 1 ; <i65> [#uses=1] 35 %tmp34 = trunc i65 %tmp3 to i8 ; <i8> [#uses=1] 36 %toBool = icmp ne i8 %tmp34, 0 ; <i1> [#uses=1] 37 br i1 %toBool, label %cond_true, label %cond_false 38 39 cond_true: ; preds = %entry 40 store i32 0, i32* %iftmp.0, align 4 41 br label %cond_next 42 43 cond_false: ; preds = %entry 44 store i32 1, i32* %iftmp.0, align 4 45 br label %cond_next 46 47 cond_next: ; preds = %cond_false, %cond_true 48 %tmp5 = getelementptr [10 x i8]* @.str, i32 0, i32 0 ; <i8*> [#uses=1] 49 %tmp6 = load i32* %iftmp.0, align 4 ; <i32> [#uses=1] 50 %tmp7 = call i32 (i8*, ...)* @printf( i8* noalias %tmp5, i32 %tmp6 ) nounwind ; <i32> [#uses=0] 51 br label %return 52 53 return: ; preds = %cond_next 54 store i32 0, i32* %retval, align 4 55 %retval8 = load i32* %retval ; <i32> [#uses=1] 56 ret i32 %retval8 57 } 58 59 declare i32 @printf(i8* noalias , ...) nounwind 60