Hal Finkel | a548afc | 2013-03-19 18:51:05 +0000 | [diff] [blame^] | 1 | ; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 |
| 2 | target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64" |
| 3 | target triple = "powerpc64-unknown-linux-gnu" |
| 4 | |
| 5 | @gen_random.last = external unnamed_addr global i64, align 8 |
| 6 | @.str = external unnamed_addr constant [4 x i8], align 1 |
| 7 | |
| 8 | declare double @gen_random(double) #0 |
| 9 | |
| 10 | declare void @benchmark_heapsort(i32 signext, double* nocapture) #0 |
| 11 | |
| 12 | define signext i32 @main(i32 signext %argc, i8** nocapture %argv) #0 { |
| 13 | entry: |
| 14 | br i1 undef, label %cond.true, label %cond.end |
| 15 | |
| 16 | cond.true: ; preds = %entry |
| 17 | br label %cond.end |
| 18 | |
| 19 | cond.end: ; preds = %cond.true, %entry |
| 20 | %cond = phi i32 [ 0, %cond.true ], [ 8000000, %entry ] |
| 21 | %add = add i32 %cond, 1 |
| 22 | %conv = sext i32 %add to i64 |
| 23 | %mul = shl nsw i64 %conv, 3 |
| 24 | %call1 = tail call noalias i8* @malloc(i64 %mul) #1 |
| 25 | br i1 undef, label %for.end, label %for.body.lr.ph |
| 26 | |
| 27 | for.body.lr.ph: ; preds = %cond.end |
| 28 | br label %for.body |
| 29 | |
| 30 | for.body: ; preds = %for.body, %for.body.lr.ph |
| 31 | %indvars.iv = phi i64 [ 1, %for.body.lr.ph ], [ %indvars.iv.next, %for.body ] |
| 32 | %indvars.iv.next = add i64 %indvars.iv, 1 |
| 33 | %lftr.wideiv = trunc i64 %indvars.iv.next to i32 |
| 34 | %exitcond = icmp eq i32 %lftr.wideiv, %add |
| 35 | br i1 %exitcond, label %for.cond.for.end_crit_edge, label %for.body |
| 36 | |
| 37 | for.cond.for.end_crit_edge: ; preds = %for.body |
| 38 | br label %for.end |
| 39 | |
| 40 | for.end: ; preds = %for.cond.for.end_crit_edge, %cond.end |
| 41 | ret i32 0 |
| 42 | } |
| 43 | |
| 44 | declare noalias i8* @malloc(i64) #0 |
| 45 | |
| 46 | declare signext i32 @printf(i8* nocapture, ...) #0 |
| 47 | |
| 48 | declare void @free(i8* nocapture) #0 |
| 49 | |
| 50 | declare i64 @strtol(i8*, i8** nocapture, i32 signext) #0 |
| 51 | |
| 52 | attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-frame-pointer-elim-non-leaf"="true" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" } |
| 53 | attributes #1 = { nounwind } |