1 ; RUN: llc < %s -mtriple=x86_64-- > %t
2 ; RUN: grep inc %t | count 1
3 ; RUN: not grep incw %t
5 @X = common global i16 0 ; <i16*> [#uses=1]
7 define i32 @foo(i32 %N) nounwind {
9 %0 = icmp sgt i32 %N, 0 ; <i1> [#uses=1]
10 br i1 %0, label %bb, label %return
12 bb: ; preds = %bb, %entry
13 %i.03 = phi i32 [ 0, %entry ], [ %indvar.next, %bb ] ; <i32> [#uses=2]
14 %1 = trunc i32 %i.03 to i16 ; <i16> [#uses=1]
15 store volatile i16 %1, i16* @X, align 2
16 %indvar.next = add i32 %i.03, 1 ; <i32> [#uses=2]
17 %exitcond = icmp eq i32 %indvar.next, %N ; <i1> [#uses=1]
18 br i1 %exitcond, label %return, label %bb
20 return: ; preds = %bb, %entry
21 %h = phi i32 [ 0, %entry ], [ %indvar.next, %bb ]