65 lines · plain
1; RUN: llc < %s2target datalayout = "e-p:16:8:8-i8:8:8-i16:8:8-i32:8:8"3target triple = "msp430-elf"4 5%struct.httpd_fs_file = type { ptr, i16 }6%struct.psock = type { %struct.pt, %struct.pt, ptr, ptr, ptr, i16, i16, %struct.httpd_fs_file, i16, i8, i8 }7%struct.pt = type { i16 }8 9@foo = external global ptr10 11define signext i8 @psock_readto(ptr nocapture %psock, i8 zeroext %c) nounwind {12entry:13 switch i16 undef, label %sw.epilog [14 i16 0, label %sw.bb15 i16 283, label %if.else.i16 ]17 18sw.bb: ; preds = %entry19 br label %do.body20 21do.body: ; preds = %while.cond36.i, %while.end.i, %sw.bb22 br label %while.cond.i23 24if.else.i: ; preds = %entry25 br i1 undef, label %psock_newdata.exit, label %if.else11.i26 27if.else11.i: ; preds = %if.else.i28 ret i8 029 30psock_newdata.exit: ; preds = %if.else.i31 ret i8 032 33while.cond.i: ; preds = %while.body.i, %do.body34 br i1 undef, label %while.end.i, label %while.body.i35 36while.body.i: ; preds = %while.cond.i37 br i1 undef, label %do.end41, label %while.cond.i38 39while.end.i: ; preds = %while.cond.i40 br i1 undef, label %do.body, label %while.cond36.i.preheader41 42while.cond36.i.preheader: ; preds = %while.end.i43 br label %while.cond36.i44 45while.cond36.i: ; preds = %while.body41.i, %while.cond36.i.preheader46 br i1 undef, label %do.body, label %while.body41.i47 48while.body41.i: ; preds = %while.cond36.i49 %tmp43.i = load ptr, ptr @foo ; <i8*> [#uses=2]50 %tmp44.i = load i8, ptr %tmp43.i ; <i8> [#uses=1]51 %ptrincdec50.i = getelementptr inbounds i8, ptr %tmp43.i, i16 1 ; <i8*> [#uses=1]52 store ptr %ptrincdec50.i, ptr @foo53 %cmp55.i = icmp eq i8 %tmp44.i, %c ; <i1> [#uses=1]54 br i1 %cmp55.i, label %do.end41, label %while.cond36.i55 56do.end41: ; preds = %while.body41.i, %while.body.i57 br i1 undef, label %if.then46, label %sw.epilog58 59if.then46: ; preds = %do.end4160 ret i8 061 62sw.epilog: ; preds = %do.end41, %entry63 ret i8 264}65