brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 83beba4 Raw
39 lines · plain
1; RUN: opt < %s -passes=instrprof -S -do-counter-promotion=1 -skip-ret-exit-block=1 | FileCheck %s --check-prefixes=CHECK,SKIP2; RUN: opt < %s -passes=instrprof -S -do-counter-promotion=1 -skip-ret-exit-block=0 | FileCheck %s --check-prefixes=CHECK,NOTSKIP3 4$__llvm_profile_raw_version = comdat any5 6@bar = dso_local local_unnamed_addr global i32 0, align 47@__llvm_profile_raw_version = constant i64 72057594037927941, comdat8@__profn_foo = private constant [3 x i8] c"foo"9 10define dso_local void @foo(i32 %n)  {11entry:12  call void @llvm.instrprof.increment(ptr @__profn_foo, i64 29212902728, i32 2, i32 1)13  br label %for.cond14 15for.cond:16  %i.0 = phi i32 [ 0, %entry ], [ %inc, %if.end ]17  %cmp = icmp slt i32 %i.0, %n18  %0 = load i32, ptr @bar, align 419  %tobool.not = icmp eq i32 %0, 020  %or.cond = and i1 %cmp, %tobool.not21  br i1 %or.cond, label %if.end, label %cleanup22 23if.end:24  call void @llvm.instrprof.increment(ptr @__profn_foo, i64 29212902728, i32 2, i32 0)25  call void (...) @bar2()26  %inc = add nuw nsw i32 %i.0, 127  br label %for.cond28 29cleanup:30; CHECK: cleanup:31; SKIP-NOT:  %pgocount.promoted32; NOTSKIP:  %pgocount.promoted33  ret void34}35 36declare dso_local void @bar2(...)37 38declare void @llvm.instrprof.increment(ptr, i64, i32, i32)39