1*f4a2713aSLionel Sambuc; RUN: llc < %s -march=x86 2*f4a2713aSLionel Sambuc; PR2098 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuctarget 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:128:128" 5*f4a2713aSLionel Sambuctarget triple = "i386-apple-darwin8" 6*f4a2713aSLionel Sambuc 7*f4a2713aSLionel Sambucdefine void @foo(i32 %x) { 8*f4a2713aSLionel Sambucentry: 9*f4a2713aSLionel Sambuc %x_addr = alloca i32 ; <i32*> [#uses=2] 10*f4a2713aSLionel Sambuc %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0] 11*f4a2713aSLionel Sambuc store i32 %x, i32* %x_addr 12*f4a2713aSLionel Sambuc %tmp = load i32* %x_addr, align 4 ; <i32> [#uses=1] 13*f4a2713aSLionel Sambuc %tmp1 = ashr i32 %tmp, -2 ; <i32> [#uses=1] 14*f4a2713aSLionel Sambuc %tmp2 = and i32 %tmp1, 1 ; <i32> [#uses=1] 15*f4a2713aSLionel Sambuc %tmp23 = trunc i32 %tmp2 to i8 ; <i8> [#uses=1] 16*f4a2713aSLionel Sambuc %toBool = icmp ne i8 %tmp23, 0 ; <i1> [#uses=1] 17*f4a2713aSLionel Sambuc br i1 %toBool, label %bb, label %bb5 18*f4a2713aSLionel Sambuc 19*f4a2713aSLionel Sambucbb: ; preds = %entry 20*f4a2713aSLionel Sambuc %tmp4 = call i32 (...)* @bar( ) nounwind ; <i32> [#uses=0] 21*f4a2713aSLionel Sambuc br label %bb5 22*f4a2713aSLionel Sambuc 23*f4a2713aSLionel Sambucbb5: ; preds = %bb, %entry 24*f4a2713aSLionel Sambuc br label %return 25*f4a2713aSLionel Sambuc 26*f4a2713aSLionel Sambucreturn: ; preds = %bb5 27*f4a2713aSLionel Sambuc ret void 28*f4a2713aSLionel Sambuc} 29*f4a2713aSLionel Sambuc 30*f4a2713aSLionel Sambucdeclare i32 @bar(...) 31