1 // RUN: %clang_cc1 -O3 -triple x86_64-unknown-linux-gnu -target-cpu x86-64 %s -o %t -dwarf-column-info -opt-record-file %t.yaml -emit-obj
2 // RUN: cat %t.yaml | FileCheck %s
3 // RUN: llvm-profdata merge %S/Inputs/opt-record.proftext -o %t.profdata
4 // RUN: %clang_cc1 -O3 -triple x86_64-unknown-linux-gnu -target-cpu x86-64 -fprofile-instrument-use-path=%t.profdata %s -o %t -dwarf-column-info -opt-record-file %t.yaml -emit-obj
5 // RUN: cat %t.yaml | FileCheck -check-prefix=CHECK -check-prefix=CHECK-PGO %s
6 // REQUIRES: x86-registered-target
7 
8 void bar();
9 void foo() { bar(); }
10 
11 void Test(int *res, int *c, int *d, int *p, int n) {
12   int i;
13 
14 #pragma clang loop vectorize(assume_safety)
15   for (i = 0; i < 1600; i++) {
16     res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
17   }
18 }
19 
20 // CHECK: --- !Missed
21 // CHECK: Pass:            inline
22 // CHECK: Name:            NoDefinition
23 // CHECK: DebugLoc:
24 // CHECK: Function:        foo
25 // CHECK-PGO: Hotness:
26 
27 // CHECK: --- !Passed
28 // CHECK: Pass:            loop-vectorize
29 // CHECK: Name:            Vectorized
30 // CHECK: DebugLoc:
31 // CHECK: Function:        Test
32 // CHECK-PGO: Hotness:
33 
34