Changeset View
Changeset View
Standalone View
Standalone View
test/Transforms/PGOProfile/preinline.ll
- This file was added.
1 | ; RUN: opt < %s -O2 -profile-generate=default.profraw -S | FileCheck %s --check-prefix=GEN | ||||
---|---|---|---|---|---|
2 | target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" | ||||
3 | target triple = "x86_64-unknown-linux-gnu" | ||||
4 | | ||||
5 | define i32 @foo(i32 %i) { | ||||
6 | entry: | ||||
7 | ; GEN: %pgocount = load i64, i64* getelementptr inbounds ([1 x i64], [1 x i64]* @__profc_foo | ||||
8 | ; GEN-NOT: %pgocount.i = load i64, i64* getelementptr inbounds ([1 x i64], [1 x i64]* @__profc__stdin__bar | ||||
mehdi_amini: Maybe add a one-line comment here saying why you have this test? | |||||
9 | %call = call i32 @bar() | ||||
Done ReplyAlso add a check that the call to bar is actually eliminated davidxl: Also add a check that the call to bar is actually eliminated | |||||
10 | %add = add nsw i32 %i, %call | ||||
11 | ret i32 %add | ||||
12 | } | ||||
13 | | ||||
14 | define internal i32 @bar() { | ||||
15 | ; GEN-NOT: define internal i32 @bar | ||||
16 | entry: | ||||
17 | %call = call i32 (...) @bar1() | ||||
18 | ret i32 %call | ||||
19 | } | ||||
20 | | ||||
21 | declare i32 @bar1(...) |
Maybe add a one-line comment here saying why you have this test?