Home | History | Annotate | Download | only in X86
      1 ; RUN: llc < %s -march=x86-64 > %t
      2 ; RUN: grep inc %t | count 1
      3 ; RUN: not grep incw %t
      4 
      5 @X = common global i16 0		; <i16*> [#uses=1]
      6 
      7 define i32 @foo(i32 %N) nounwind {
      8 entry:
      9 	%0 = icmp sgt i32 %N, 0		; <i1> [#uses=1]
     10 	br i1 %0, label %bb, label %return
     11 
     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
     19 
     20 return:		; preds = %bb, %entry
     21         %h = phi i32 [ 0, %entry ], [ %indvar.next, %bb ]
     22 	ret i32 %h
     23 }
     24