brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · c81f8d4 Raw
46 lines · plain
1; RUN: opt -pgo-kind=pgo-instr-gen-pipeline -passes="default<O3>" -enable-nontrivial-unswitch -S < %s | FileCheck %s2; REQUIRES: asserts3 4target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"5target triple = "x86_64-unknown-linux-gnu"6 7@__profn_c = private constant [1 x i8] c"c"8@b = common dso_local global i32 0, align 49@a = common dso_local global i16 0, align 210 11; CHECK-LABEL: @c()12; Function Attrs: nounwind uwtable13define dso_local void @c() {14entry:15  call void @llvm.instrprof.increment(ptr @__profn_c, i64 68269137, i32 3, i32 0)16  br label %for.cond17 18for.cond:                                         ; preds = %for.end, %entry19  call void @llvm.instrprof.increment(ptr @__profn_c, i64 68269137, i32 3, i32 1)20  store i32 0, ptr @b, align 421  br label %for.cond122 23for.cond1:                                        ; preds = %for.inc, %for.cond24  %0 = load i32, ptr @b, align 425  %1 = load i16, ptr @a, align 226  %conv = sext i16 %1 to i3227  %cmp = icmp slt i32 %0, %conv28  br i1 %cmp, label %for.body, label %for.end29 30for.body:                                         ; preds = %for.cond131  call void @llvm.instrprof.increment(ptr @__profn_c, i64 68269137, i32 3, i32 2)32  br label %for.inc33 34for.inc:                                          ; preds = %for.body35  %2 = load i32, ptr @b, align 436  %inc = add nsw i32 %2, 137  store i32 %inc, ptr @b, align 438  br label %for.cond139 40for.end:                                          ; preds = %for.cond141  br label %for.cond42}43 44; Function Attrs: nounwind45declare void @llvm.instrprof.increment(ptr, i64, i32, i32)46