Home | History | Annotate | Download | only in PowerPC
      1 ; RUN: llc < %s | FileCheck %s
      2 target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v128:128:128-n32"
      3 target triple = "powerpc-unknown-linux"
      4 
      5 @.str = private unnamed_addr constant [3 x i8] c"%i\00", align 1
      6 
      7 define void @test(i32 %count) nounwind {
      8 entry:
      9 ; CHECK: crxor 6, 6, 6
     10   %call = tail call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i32 1) nounwind
     11   %cmp2 = icmp sgt i32 %count, 0
     12   br i1 %cmp2, label %for.body, label %for.end
     13 
     14 for.body:                                         ; preds = %entry, %for.body
     15   %i.03 = phi i32 [ %inc, %for.body ], [ 0, %entry ]
     16 ; CHECK: crxor 6, 6, 6
     17   %call1 = tail call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i32 1) nounwind
     18   %inc = add nsw i32 %i.03, 1
     19   %exitcond = icmp eq i32 %inc, %count
     20   br i1 %exitcond, label %for.end, label %for.body
     21 
     22 for.end:                                          ; preds = %for.body, %entry
     23   ret void
     24 }
     25 
     26 declare i32 @printf(i8* nocapture, ...) nounwind
     27