brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.3 KiB · 2c51d6a Raw
102 lines · plain
1; RUN: opt < %s -passes=pgo-icall-prom -S | FileCheck %s2 3target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"4target triple = "x86_64-unknown-linux-gnu"5 6@foo = common global ptr null, align 87 8; The names on the IR and in the profile are both "func1".9define i32 @func1() {10entry:11  ret i32 112}13 14define i32 @bar1() {15entry:16  %tmp1 = load ptr, ptr @foo, align 817; CHECK: icmp eq ptr %tmp1, @func118  %call = call i32 %tmp1(), !prof !119  ret i32 %call20}21 22; The name on the IR has ".llvm." suffix: "func2.llvm.10895321227755557127".23; The name in the profile has no ".llvm." suffix: "func2".24define i32 @func2.llvm.10895321227755557127() {25entry:26  ret i32 127}28 29define i32 @bar2() {30entry:31  %tmp2 = load ptr, ptr @foo, align 832; CHECK: icmp eq ptr %tmp2, @func2.llvm.1089532122775555712733  %call = call i32 %tmp2(), !prof !234  ret i32 %call35}36 37; The names on the IR and in the profile are both38; "func3.__uniq.258901567653530696343884446915951489119".39define i32 @func3.__uniq.258901567653530696343884446915951489119() {40entry:41  ret i32 242}43 44define i32 @bar3() {45entry:46  %tmp3 = load ptr, ptr @foo, align 847; CHECK: icmp eq ptr %tmp3, @func3.__uniq.25890156765353069634388444691595148911948  %call = call i32 %tmp3(), !prof !349  ret i32 %call50}51 52; The name on the IR has ".__uniq." and ".llvm." suffix:53; "func4.__uniq.140291095734751150107370763113257199296.llvm.10650195578168450516".54; The name in the profile has ".__uniq." but no ".llvm." suffix:55; "func4.__uniq.140291095734751150107370763113257199296".56define i32 @func4.__uniq.140291095734751150107370763113257199296.llvm.10650195578168450516() {57entry:58  ret i32 359}60 61define i32 @bar4() {62entry:63  %tmp4 = load ptr, ptr @foo, align 864; CHECK: icmp eq ptr %tmp4, @func4.__uniq.140291095734751150107370763113257199296.llvm.1065019557816845051665  %call = call i32 %tmp4(), !prof !466  ret i32 %call67}68 69; The name on the IR has ".__uniq.", ".part." and ".llvm." suffix:70; "func4.__uniq.127882361580787111523790444488985774976.part.818292359123831.llvm.10650195578168450516".71; The name in the profile has ".__uniq." but no ".llvm." and no ".part." suffix:72; "func4.__uniq.127882361580787111523790444488985774976".73define i32 @func5.__uniq.127882361580787111523790444488985774976.part.818292359123831.llvm.10650195578168450516() {74entry:75  ret i32 376}77 78define i32 @bar5() {79entry:80  %tmp5 = load ptr, ptr @foo, align 881; CHECK: icmp eq ptr %tmp5, @func5.__uniq.127882361580787111523790444488985774976.part.818292359123831.llvm.1065019557816845051682  %call = call i32 %tmp5(), !prof !583  ret i32 %call84}85 86; Check symbol with '.' in the front is handled properly.87define i32 @..func6() {88entry:89  ret i32 390}91 92; GUID of "func1" is -2545542355363006406.93; GUID of "func2" is -4377547752858689819.94; GUID of "func3.__uniq.258901567653530696343884446915951489119" is 8271224222042874235.95; GUID of "func4.__uniq.140291095734751150107370763113257199296" is 1491826207425861106.96; GUID of "func5.__uniq.127882361580787111523790444488985774976" is -4238550483433487304.97!1 = !{!"VP", i32 0, i64 1600, i64 -2545542355363006406, i64 1600}98!2 = !{!"VP", i32 0, i64 1600, i64 -4377547752858689819, i64 1600}99!3 = !{!"VP", i32 0, i64 1600, i64 8271224222042874235, i64 1600}100!4 = !{!"VP", i32 0, i64 1600, i64 1491826207425861106, i64 1600}101!5 = !{!"VP", i32 0, i64 1600, i64 -4238550483433487304, i64 1600}102