1 ; RUN: llc < %s 2 ; PR4769 3 target datalayout = "e-p:16:8:8-i8:8:8-i16:8:8-i32:8:8" 4 target triple = "msp430-generic-generic" 5 6 define i16 @foo() nounwind readnone { 7 entry: 8 %result = alloca i16, align 1 ; <i16*> [#uses=2] 9 volatile store i16 0, i16* %result 10 %tmp = volatile load i16* %result ; <i16> [#uses=1] 11 ret i16 %tmp 12 } 13 14 define i16 @main() nounwind { 15 entry: 16 br label %while.cond 17 18 while.cond: ; preds = %while.cond, %entry 19 %call = call i16 @bar() nounwind ; <i16> [#uses=1] 20 %tobool = icmp eq i16 %call, 0 ; <i1> [#uses=1] 21 br i1 %tobool, label %while.end, label %while.cond 22 23 while.end: ; preds = %while.cond 24 %result.i = alloca i16, align 1 ; <i16*> [#uses=2] 25 volatile store i16 0, i16* %result.i 26 %tmp.i = volatile load i16* %result.i ; <i16> [#uses=0] 27 ret i16 0 28 } 29 30 declare i16 @bar() 31