Bump version to 19.1.0-rc3
[llvm-project.git] / llvm / test / ThinLTO / X86 / dot-dumper2.ll
blob51f6c76ea5d70dc32baa86976ae5f30c91e934a8
1 ; Test writeOnly attribute
2 ; RUN: opt -module-summary %s -o %t1.bc
3 ; RUN: opt -module-summary %p/Inputs/dot-dumper2.ll -o %t2.bc
4 ; RUN: llvm-lto2 run -save-temps %t1.bc %t2.bc -o %t3 \
5 ; RUN:  -r=%t1.bc,main,px \
6 ; RUN:  -r=%t1.bc,A, \
7 ; RUN:  -r=%t2.bc,A,p
9 ; RUN: cat %t3.index.dot | FileCheck --check-prefix=COMBINED %s
11 ; COMBINED: digraph Summary {
12 ; COMBINED-NEXT:  // Module:
13 ; COMBINED-NEXT:  subgraph cluster_0 {
14 ; COMBINED-NEXT:    style = filled;
15 ; COMBINED-NEXT:    color = lightgrey;
16 ; COMBINED-NEXT:    label =
17 ; COMBINED-NEXT:    node [style=filled,fillcolor=lightblue];
18 ; COMBINED-NEXT:    M0_[[MAIN:[0-9]+]] [shape="record",label="main|extern (inst: 2, ffl: 0000000000)}"]; // function
19 ; COMBINED-NEXT:    // Edges:
20 ; COMBINED-NEXT:  }
21 ; COMBINED-NEXT:  // Module:
22 ; COMBINED-NEXT:  subgraph cluster_1 {
23 ; COMBINED-NEXT:    style = filled;
24 ; COMBINED-NEXT:    color = lightgrey;
25 ; COMBINED-NEXT:    label =
26 ; COMBINED-NEXT:    node [style=filled,fillcolor=lightblue];
27 ; COMBINED-NEXT:    M1_[[A:[0-9]+]] [shape="Mrecord",label="A|extern}"]; // variable, writeOnly
28 ; COMBINED-NEXT:    // Edges:
29 ; COMBINED-NEXT:  }
30 ; COMBINED-NEXT:  // Cross-module edges:
31 ; COMBINED-NEXT:  M0_[[MAIN]] -> M1_[[A]] [style=dashed,color=violetred]; // writeOnly-ref
32 ; COMBINED-NEXT: }
34 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
35 target triple = "x86_64-unknown-linux-gnu"
37 @A = external local_unnamed_addr global i32, align 4
39 ; Function Attrs: nounwind uwtable
40 define i32 @main() local_unnamed_addr {
41   store i32 42, ptr @A, align 4
42   ret i32 0