1cee313d2SEric Christopher; RUN: llvm-profdata merge %S/Inputs/remap.proftext -o %t.profdata 2cee313d2SEric Christopher; RUN: opt < %s -passes=pgo-instr-use -pgo-test-profile-file=%t.profdata -pgo-test-profile-remapping-file=%S/Inputs/remap.map -S | FileCheck %s --check-prefix=USE 3cee313d2SEric Christopher 47b1d7937SAmy Huangtarget datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 5cee313d2SEric Christophertarget triple = "x86_64-unknown-linux-gnu" 6cee313d2SEric Christopher 7cee313d2SEric Christopherdefine i32 @_ZN3foo3barERKN1M1XINS_6detail3quxEEE(i32 %i) { 8cee313d2SEric Christopher; USE-LABEL: @_ZN3foo3barERKN1M1XINS_6detail3quxEEE 9cee313d2SEric Christopher; USE-SAME: !prof ![[FUNC_ENTRY_COUNT:[0-9]+]] 10cee313d2SEric Christopherentry: 11cee313d2SEric Christopher %cmp = icmp sgt i32 %i, 0 12cee313d2SEric Christopher br i1 %cmp, label %if.then, label %if.end 13cee313d2SEric Christopher; USE: br i1 %cmp, label %if.then, label %if.end 14cee313d2SEric Christopher; USE-SAME: !prof ![[BW_ENTRY:[0-9]+]] 15cee313d2SEric Christopher 16cee313d2SEric Christopherif.then: 17cee313d2SEric Christopher %add = add nsw i32 %i, 2 18cee313d2SEric Christopher br label %if.end 19cee313d2SEric Christopher 20cee313d2SEric Christopherif.end: 21cee313d2SEric Christopher %retv = phi i32 [ %add, %if.then ], [ %i, %entry ] 22cee313d2SEric Christopher ret i32 %retv 23cee313d2SEric Christopher} 24cee313d2SEric Christopher 25cee313d2SEric Christopher; USE-DAG: {{![0-9]+}} = !{i32 1, !"ProfileSummary", {{![0-9]+}}} 26cee313d2SEric Christopher; USE-DAG: {{![0-9]+}} = !{!"DetailedSummary", {{![0-9]+}}} 27cee313d2SEric Christopher; USE-DAG: ![[FUNC_ENTRY_COUNT]] = !{!"function_entry_count", i64 3} 28*5c31b8b9SArthur Eubanks; USE-DAG: ![[BW_ENTRY]] = !{!"branch_weights", i32 2, i32 1} 29