brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · 6871638 Raw
57 lines · plain
1; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr72target 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"3target triple = "powerpc64-unknown-linux-gnu"4 5; This tests that the GPRC/GPRC_NOR0 intersection subclass relationship with6; GPRC is handled correctly. When it was not, this test would assert.7 8@gen_random.last = external unnamed_addr global i64, align 89@.str = external unnamed_addr constant [4 x i8], align 110 11declare double @gen_random(double) #012 13declare void @benchmark_heapsort(i32 signext, ptr nocapture) #014 15define signext i32 @main(i32 signext %argc, ptr nocapture %argv) #0 {16entry:17  br i1 undef, label %cond.true, label %cond.end18 19cond.true:                                        ; preds = %entry20  br label %cond.end21 22cond.end:                                         ; preds = %cond.true, %entry23  %cond = phi i32 [ 0, %cond.true ], [ 8000000, %entry ]24  %add = add i32 %cond, 125  %conv = sext i32 %add to i6426  %mul = shl nsw i64 %conv, 327  %call1 = tail call noalias ptr @malloc(i64 %mul) #128  br i1 undef, label %for.end, label %for.body.lr.ph29 30for.body.lr.ph:                                   ; preds = %cond.end31  br label %for.body32 33for.body:                                         ; preds = %for.body, %for.body.lr.ph34  %indvars.iv = phi i64 [ 1, %for.body.lr.ph ], [ %indvars.iv.next, %for.body ]35  %indvars.iv.next = add i64 %indvars.iv, 136  %lftr.wideiv = trunc i64 %indvars.iv.next to i3237  %exitcond = icmp eq i32 %lftr.wideiv, %add38  br i1 %exitcond, label %for.cond.for.end_crit_edge, label %for.body39 40for.cond.for.end_crit_edge:                       ; preds = %for.body41  br label %for.end42 43for.end:                                          ; preds = %for.cond.for.end_crit_edge, %cond.end44  ret i32 045}46 47declare noalias ptr @malloc(i64) #048 49declare signext i32 @printf(ptr nocapture, ...) #050 51declare void @free(ptr nocapture) #052 53declare i64 @strtol(ptr, ptr nocapture, i32 signext) #054 55attributes #0 = { nounwind "less-precise-fpmad"="false" "frame-pointer"="non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "use-soft-float"="false" }56attributes #1 = { nounwind }57