
This brings our tree to NetBSD 7.0, as found on -current on the 10-10-2015. This updates: - LLVM to 3.6.1 - GCC to GCC 5.1 - Replace minix/commands/zdump with usr.bin/zdump - external/bsd/libelf has moved to /external/bsd/elftoolchain/ - Import ctwm - Drop sprintf from libminc Change-Id: I149836ac18e9326be9353958bab9b266efb056f0
20 lines
576 B
C
20 lines
576 B
C
// RUN: %clang_profgen -o %t -O3 %s
|
|
// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t
|
|
// RUN: llvm-profdata merge -o %t.profdata %t.profraw
|
|
// RUN: %clang_profuse=%t.profdata -o - -S -emit-llvm %s | FileCheck %s
|
|
|
|
void __llvm_profile_reset_counters(void);
|
|
void foo(int);
|
|
int main(void) {
|
|
foo(0);
|
|
__llvm_profile_reset_counters();
|
|
foo(1);
|
|
return 0;
|
|
}
|
|
void foo(int N) {
|
|
// CHECK-LABEL: define void @foo(
|
|
// CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}}, !prof ![[FOO:[0-9]+]]
|
|
if (N) {}
|
|
}
|
|
// CHECK: ![[FOO]] = metadata !{metadata !"branch_weights", i32 2, i32 1}
|