71 lines · plain
1; REQUIRES: x862 3; RUN: rm -rf %t && split-file %s %t4; RUN: opt -module-summary %t/a.ll -o %t/a.bc5; RUN: llvm-profdata merge %t/cs.proftext -o %t/cs.profdata6 7; Ensure lld generates warnings for profile cfg mismatch.8; RUN: lld-link /dll /noentry /export:f /lto-cs-profile-file:%t/cs.profdata /lto-pgo-warn-mismatch /opt:lldlto=2 %t/a.bc /out:%t/a.dll 2>&1 | FileCheck %s9 10; Ensure lld will not generate warnings for profile cfg mismatch.11; RUN: lld-link /dll /noentry /export:f /lto-cs-profile-file:%t/cs.profdata /lto-pgo-warn-mismatch:no /opt:lldlto=2 %t/a.bc /out:%t/a.dll 2>&1 | count 012 13; CHECK: warning: {{.*}} function control flow change detected (hash mismatch) f Hash = [[#]]14 15;--- a.ll16target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"17target triple = "x86_64-pc-windows-msvc"18 19define i32 @f(i32 returned %a) #0 {20entry:21 ret i32 %a22}23 24attributes #0 = { "target-cpu"="x86-64" }25 26!llvm.module.flags = !{!0, !1}27 28!0 = !{i32 1, !"wchar_size", i32 4}29!1 = !{i32 1, !"ProfileSummary", !2}30!2 = !{!3, !4, !5, !6, !7, !8, !9, !10, !11, !12}31!3 = !{!"ProfileFormat", !"InstrProf"}32!4 = !{!"TotalCount", i64 2}33!5 = !{!"MaxCount", i64 1}34!6 = !{!"MaxInternalCount", i64 0}35!7 = !{!"MaxFunctionCount", i64 1}36!8 = !{!"NumCounts", i64 3}37!9 = !{!"NumFunctions", i64 2}38!10 = !{!"IsPartialProfile", i64 0}39!11 = !{!"PartialProfileRatio", double 0.000000e+00}40!12 = !{!"DetailedSummary", !13}41!13 = !{!14, !15, !16, !17, !18, !19, !20, !21, !22, !23, !24, !25, !26, !27, !28, !29}42!14 = !{i32 10000, i64 0, i32 0}43!15 = !{i32 100000, i64 0, i32 0}44!16 = !{i32 200000, i64 0, i32 0}45!17 = !{i32 300000, i64 0, i32 0}46!18 = !{i32 400000, i64 0, i32 0}47!19 = !{i32 500000, i64 1, i32 2}48!20 = !{i32 600000, i64 1, i32 2}49!21 = !{i32 700000, i64 1, i32 2}50!22 = !{i32 800000, i64 1, i32 2}51!23 = !{i32 900000, i64 1, i32 2}52!24 = !{i32 950000, i64 1, i32 2}53!25 = !{i32 990000, i64 1, i32 2}54!26 = !{i32 999000, i64 1, i32 2}55!27 = !{i32 999900, i64 1, i32 2}56!28 = !{i32 999990, i64 1, i32 2}57!29 = !{i32 999999, i64 1, i32 2}58 59;--- cs.proftext60# CSIR level Instrumentation Flag61:csir62f63# Func Hash:64153591497966275788765# Num Counters:66267# Counter Values:68169070 71