1*7c3d14c8STreehugger Robot // RUN: %clang_profgen -o %t -O3 %s
2*7c3d14c8STreehugger Robot // RUN: env LLVM_PROFILE_FILE=%h.%t-%h.profraw_%h %run %t
3*7c3d14c8STreehugger Robot // RUN: %run uname -n > %t.n
4*7c3d14c8STreehugger Robot // RUN: llvm-profdata merge -o %t.profdata `cat %t.n`.%t-`cat %t.n`.profraw_`cat %t.n`
5*7c3d14c8STreehugger Robot // RUN: %clang_profuse=%t.profdata -o - -S -emit-llvm %s | FileCheck %s
6*7c3d14c8STreehugger Robot // REQUIRES: shell
7*7c3d14c8STreehugger Robot
main(int argc,const char * argv[])8*7c3d14c8STreehugger Robot int main(int argc, const char *argv[]) {
9*7c3d14c8STreehugger Robot // CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}}, !prof ![[PD1:[0-9]+]]
10*7c3d14c8STreehugger Robot if (argc > 2)
11*7c3d14c8STreehugger Robot return 1;
12*7c3d14c8STreehugger Robot return 0;
13*7c3d14c8STreehugger Robot }
14*7c3d14c8STreehugger Robot // CHECK: ![[PD1]] = !{!"branch_weights", i32 1, i32 2}
15