brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.5 KiB · 0328b45 Raw
125 lines · plain
1; RUN: llc -mtriple=hexagon -O2 < %s2; REQUIRES: asserts3 4target triple = "hexagon-unknown--elf"5 6%struct.cpumask = type { [1 x i32] }7%struct.load_weight = type { i32, i32 }8 9@sysctl_sched_latency = global i32 6000000, align 410@normalized_sysctl_sched_latency = global i32 6000000, align 411@sysctl_sched_tunable_scaling = global i8 1, align 112@sysctl_sched_min_granularity = global i32 750000, align 413@normalized_sysctl_sched_min_granularity = global i32 750000, align 414@sysctl_sched_wakeup_granularity = global i32 1000000, align 415@normalized_sysctl_sched_wakeup_granularity = global i32 1000000, align 416@sysctl_sched_migration_cost = constant i32 500000, align 417@sysctl_sched_shares_window = global i32 10000000, align 418@sysctl_sched_child_runs_first = common global i32 0, align 419@cpu_online_mask = external constant ptr20 21; Function Attrs: noinline nounwind22define void @sched_init_granularity() #0 {23entry:24  tail call fastcc void @update_sysctl()25  ret void26}27 28; Function Attrs: noinline nounwind29define internal fastcc void @update_sysctl() #0 {30entry:31  %call = tail call i32 @get_update_sysctl_factor()32  %0 = load i32, ptr @normalized_sysctl_sched_min_granularity, align 4, !tbaa !133  %mul = mul i32 %0, %call34  store i32 %mul, ptr @sysctl_sched_min_granularity, align 4, !tbaa !135  %1 = load i32, ptr @normalized_sysctl_sched_latency, align 4, !tbaa !136  %mul1 = mul i32 %1, %call37  store i32 %mul1, ptr @sysctl_sched_latency, align 4, !tbaa !138  %2 = load i32, ptr @normalized_sysctl_sched_wakeup_granularity, align 4, !tbaa !139  %mul2 = mul i32 %2, %call40  store i32 %mul2, ptr @sysctl_sched_wakeup_granularity, align 4, !tbaa !141  ret void42}43 44; Function Attrs: noinline nounwind45define i32 @calc_delta_mine(i32 %delta_exec, i32 %weight, ptr nocapture %lw) #0 {46entry:47  %cmp = icmp ugt i32 %weight, 148  %conv = zext i32 %delta_exec to i6449  br i1 %cmp, label %if.then, label %if.end, !prof !550 51if.then:                                          ; preds = %entry52  %conv2 = zext i32 %weight to i6453  %mul = mul i64 %conv2, %conv54  br label %if.end55 56if.end:                                           ; preds = %entry, %if.then57  %tmp.0 = phi i64 [ %mul, %if.then ], [ %conv, %entry ]58  %inv_weight = getelementptr inbounds %struct.load_weight, ptr %lw, i32 0, i32 159  %0 = load i32, ptr %inv_weight, align 4, !tbaa !660  %tobool4 = icmp eq i32 %0, 061  br i1 %tobool4, label %if.then5, label %if.end2262 63if.then5:                                         ; preds = %if.end64  %1 = load i32, ptr %lw, align 4, !tbaa !965  %lnot9 = icmp eq i32 %1, 066  br i1 %lnot9, label %if.then17, label %if.else19, !prof !1067 68if.then17:                                        ; preds = %if.then569  store i32 -1, ptr %inv_weight, align 4, !tbaa !670  br label %if.end2271 72if.else19:                                        ; preds = %if.then573  %div = udiv i32 -1, %174  store i32 %div, ptr %inv_weight, align 4, !tbaa !675  br label %if.end2276 77if.end22:                                         ; preds = %if.end, %if.then17, %if.else1978  %2 = phi i32 [ %0, %if.end ], [ -1, %if.then17 ], [ %div, %if.else19 ]79  %cmp23 = icmp ugt i64 %tmp.0, 429496729580  br i1 %cmp23, label %if.then31, label %if.else37, !prof !1081 82if.then31:                                        ; preds = %if.end2283  %add = add i64 %tmp.0, 3276884  %shr = lshr i64 %add, 1685  %conv33 = zext i32 %2 to i6486  %mul34 = mul i64 %conv33, %shr87  %add35 = add i64 %mul34, 3276888  %shr36 = lshr i64 %add35, 1689  br label %if.end4390 91if.else37:                                        ; preds = %if.end2292  %conv39 = zext i32 %2 to i6493  %mul40 = mul i64 %conv39, %tmp.094  %add41 = add i64 %mul40, 214748364895  %shr42 = lshr i64 %add41, 3296  br label %if.end4397 98if.end43:                                         ; preds = %if.else37, %if.then3199  %tmp.1 = phi i64 [ %shr36, %if.then31 ], [ %shr42, %if.else37 ]100  %cmp49 = icmp ult i64 %tmp.1, 2147483647101  %3 = trunc i64 %tmp.1 to i32102  %conv51 = select i1 %cmp49, i32 %3, i32 2147483647103  ret i32 %conv51104}105 106declare i32 @get_update_sysctl_factor() #0107declare i32 @__bitmap_weight(ptr, i32) #0108 109attributes #0 = { noinline nounwind }110 111!1 = !{!2, !2, i64 0}112!2 = !{!"int", !3, i64 0}113!3 = !{!"omnipotent char", !4, i64 0}114!4 = !{!"Simple C/C++ TBAA"}115!5 = !{!"branch_weights", i32 64, i32 4}116!6 = !{!7, !8, i64 4}117!7 = !{!"load_weight", !8, i64 0, !8, i64 4}118!8 = !{!"long", !3, i64 0}119!9 = !{!7, !8, i64 0}120!10 = !{!"branch_weights", i32 4, i32 64}121!11 = !{!12, !12, i64 0}122!12 = !{!"any pointer", !3, i64 0}123!13 = !{!3, !3, i64 0}124!14 = !{i32 45854, i32 45878}125