1 ; REQUIRES: x86-registered-target
3 ; RUN: opt -passes='thinlto-pre-link<O2>' --cs-profilegen-file=alloc -cspgo-kind=cspgo-instr-gen-pipeline -module-summary %s -o %t.bc
4 ; RUN: llvm-dis %t.bc -o - | FileCheck %s --check-prefix=IRPGOPRE
6 ;; Symbol __llvm_profile_filename and __llvm_profile_raw_version are non-prevailing here.
7 ; RUN: llvm-lto2 run -lto-cspgo-profile-file=alloc -lto-cspgo-gen -save-temps -o %t %t.bc \
9 ; RUN: -r=%t.bc,__llvm_profile_filename,x \
10 ; RUN: -r=%t.bc,__llvm_profile_raw_version,x
11 ; RUN: llvm-dis %t.0.0.preopt.bc -o - | FileCheck %s --check-prefix=IRPGOBE
13 ;; Before LTO, we should have the __llvm_profile_raw_version definition.
14 ; IRPGOPRE: @__llvm_profile_raw_version = hidden constant i64
16 ;; Non-prevailing __llvm_profile_raw_version is discarded by LTO. Ensure the
17 ;; declaration is retained.
18 ; IRPGOBE: @__llvm_profile_raw_version = external hidden constant i64
20 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
21 target triple = "x86_64-unknown-linux-gnu"
25 ; Function Attrs: nofree norecurse nosync nounwind readnone uwtable willreturn mustprogress
31 !llvm.module.flags = !{!0}
32 !0 = !{i32 1, !"ThinLTO", i32 0}