summaryrefslogtreecommitdiffstats
path: root/llvm/test/ThinLTO/X86
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/ThinLTO/X86')
-rw-r--r--llvm/test/ThinLTO/X86/Inputs/dot-dumper2.ll4
-rw-r--r--llvm/test/ThinLTO/X86/dot-dumper2.ll43
-rw-r--r--llvm/test/ThinLTO/X86/index-const-prop2.ll44
-rw-r--r--llvm/test/ThinLTO/X86/load-store-caching.ll26
-rw-r--r--llvm/test/ThinLTO/X86/writeonly.ll41
-rw-r--r--llvm/test/ThinLTO/X86/writeonly2.ll50
6 files changed, 2 insertions, 206 deletions
diff --git a/llvm/test/ThinLTO/X86/Inputs/dot-dumper2.ll b/llvm/test/ThinLTO/X86/Inputs/dot-dumper2.ll
deleted file mode 100644
index 6d9783e92d0..00000000000
--- a/llvm/test/ThinLTO/X86/Inputs/dot-dumper2.ll
+++ /dev/null
@@ -1,4 +0,0 @@
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-target triple = "x86_64-unknown-linux-gnu"
-
-@A = local_unnamed_addr global i32 10, align 4
diff --git a/llvm/test/ThinLTO/X86/dot-dumper2.ll b/llvm/test/ThinLTO/X86/dot-dumper2.ll
deleted file mode 100644
index 8cc9822aed4..00000000000
--- a/llvm/test/ThinLTO/X86/dot-dumper2.ll
+++ /dev/null
@@ -1,43 +0,0 @@
-; Test writeOnly attribute
-; RUN: opt -module-summary %s -o %t1.bc
-; RUN: opt -module-summary %p/Inputs/dot-dumper2.ll -o %t2.bc
-; RUN: llvm-lto2 run -save-temps %t1.bc %t2.bc -o %t3 \
-; RUN: -r=%t1.bc,main,px \
-; RUN: -r=%t1.bc,A, \
-; RUN: -r=%t2.bc,A,p
-
-; RUN: cat %t3.index.dot | FileCheck --check-prefix=COMBINED %s
-
-; COMBINED: digraph Summary {
-; COMBINED-NEXT: // Module:
-; COMBINED-NEXT: subgraph cluster_0 {
-; COMBINED-NEXT: style = filled;
-; COMBINED-NEXT: color = lightgrey;
-; COMBINED-NEXT: label =
-; COMBINED-NEXT: node [style=filled,fillcolor=lightblue];
-; COMBINED-NEXT: M0_[[MAIN:[0-9]+]] [shape="record",label="main|extern (inst: 2, ffl: 00000)}"]; // function
-; COMBINED-NEXT: // Edges:
-; COMBINED-NEXT: }
-; COMBINED-NEXT: // Module:
-; COMBINED-NEXT: subgraph cluster_1 {
-; COMBINED-NEXT: style = filled;
-; COMBINED-NEXT: color = lightgrey;
-; COMBINED-NEXT: label =
-; COMBINED-NEXT: node [style=filled,fillcolor=lightblue];
-; COMBINED-NEXT: M1_[[A:[0-9]+]] [shape="Mrecord",label="A|extern}"]; // variable, writeOnly
-; COMBINED-NEXT: // Edges:
-; COMBINED-NEXT: }
-; COMBINED-NEXT: // Cross-module edges:
-; COMBINED-NEXT: M0_[[MAIN]] -> M1_[[A]] [style=dashed,color=violetred]; // writeOnly-ref
-; COMBINED-NEXT: }
-
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-target triple = "x86_64-unknown-linux-gnu"
-
-@A = external local_unnamed_addr global i32, align 4
-
-; Function Attrs: nounwind uwtable
-define i32 @main() local_unnamed_addr {
- store i32 42, i32* @A, align 4
- ret i32 0
-}
diff --git a/llvm/test/ThinLTO/X86/index-const-prop2.ll b/llvm/test/ThinLTO/X86/index-const-prop2.ll
index a5fbbdf1e92..96b7593dd4f 100644
--- a/llvm/test/ThinLTO/X86/index-const-prop2.ll
+++ b/llvm/test/ThinLTO/X86/index-const-prop2.ll
@@ -11,10 +11,8 @@
; RUN: -r=%t2.bc,rand, \
; RUN: -r=%t2.bc,gBar,pl \
; RUN: -r=%t1.bc,main,plx \
-; RUN: -r=%t1.bc,main2,pl \
; RUN: -r=%t1.bc,foo, \
; RUN: -r=%t1.bc,bar, \
-; RUN: -r=%t1.bc,baz, \
; RUN: -r=%t1.bc,gBar, \
; RUN: -o %t3
; RUN: llvm-dis %t3.1.3.import.bc -o - | FileCheck %s --check-prefix=IMPORT
@@ -28,32 +26,11 @@
; RUN: -r=%t2.bc,rand, \
; RUN: -r=%t2.bc,gBar,plx \
; RUN: -r=%t1.bc,main,plx \
-; RUN: -r=%t1.bc,main2,pl \
; RUN: -r=%t1.bc,foo, \
; RUN: -r=%t1.bc,bar, \
-; RUN: -r=%t1.bc,baz, \
; RUN: -r=%t1.bc,gBar, \
-; RUN: -o %t4
-; RUN: llvm-dis %t4.1.3.import.bc -o - | FileCheck %s --check-prefix=IMPORT2
-
-; RUN: llvm-lto2 run %t1.bc %t2.bc -save-temps \
-; RUN: -r=%t2.bc,foo,pl \
-; RUN: -r=%t2.bc,bar,pl \
-; RUN: -r=%t2.bc,baz,pl \
-; RUN: -r=%t2.bc,rand, \
-; RUN: -r=%t2.bc,gBar,pl \
-; RUN: -r=%t1.bc,main,pl \
-; RUN: -r=%t1.bc,main2,plx \
-; RUN: -r=%t1.bc,foo, \
-; RUN: -r=%t1.bc,bar, \
-; RUN: -r=%t1.bc,baz, \
-; RUN: -r=%t1.bc,gBar, \
-; RUN: -o %t5
-; RUN: llvm-dis %t5.1.3.import.bc -o - | FileCheck %s --check-prefix=IMPORT
-; RUN: llvm-dis %t5.1.5.precodegen.bc -o - | FileCheck %s --check-prefix=CODEGEN2
-; Check that gFoo and gBar were eliminated from source module together
-; with corresponsing stores
-; RUN: llvm-dis %t5.2.5.precodegen.bc -o - | FileCheck %s --check-prefix=CODEGEN2-SRC
+; RUN: -o %t3
+; RUN: llvm-dis %t3.1.3.import.bc -o - | FileCheck %s --check-prefix=IMPORT2
; IMPORT: @gFoo.llvm.0 = internal unnamed_addr global i32 1, align 4
; IMPORT-NEXT: @gBar = internal local_unnamed_addr global i32 2, align 4
@@ -64,16 +41,6 @@
; IMPORT2: @gBar = available_externally dso_local local_unnamed_addr global i32 2, align 4
-; CODEGEN2: i32 @main2
-; CODEGEN2-NEXT: %1 = tail call i32 @rand()
-; CODEGEN2-NEXT: %2 = tail call i32 @rand()
-; CODEGEN2-NEXT: ret i32 0
-
-; CODEGEN2-SRC: void @baz()
-; CODEGEN2-SRC-NEXT: %1 = tail call i32 @rand()
-; CODEGEN2-SRC-NEXT: %2 = tail call i32 @rand()
-; CODEGEN2-SRC-NEXT: ret void
-
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@@ -87,13 +54,6 @@ define i32 @main() local_unnamed_addr {
ret i32 %add
}
-define i32 @main2() local_unnamed_addr {
- tail call void @baz()
- ret i32 0
-}
-
declare i32 @foo(...) local_unnamed_addr
declare i32 @bar(...) local_unnamed_addr
-
-declare void @baz() local_unnamed_addr
diff --git a/llvm/test/ThinLTO/X86/load-store-caching.ll b/llvm/test/ThinLTO/X86/load-store-caching.ll
deleted file mode 100644
index 9ca9c40fd11..00000000000
--- a/llvm/test/ThinLTO/X86/load-store-caching.ll
+++ /dev/null
@@ -1,26 +0,0 @@
-; Test that instruction operands from loads are not cached when
-; processing stores. Reference from @foo to @obj should not be
-; readonly or writeonly
-
-; RUN: opt -module-summary %s -o %t.bc
-; RUN: llvm-dis %t.bc -o - | FileCheck %s
-
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-target triple = "x86_64-unknown-linux-gnu"
-
-%struct.S = type { %struct.Derived* }
-%struct.Derived = type { i32 }
-%struct.Base = type { i32 }
-
-@obj = dso_local local_unnamed_addr global %struct.S zeroinitializer, align 8
-
-define dso_local %struct.Base* @foo() local_unnamed_addr {
-entry:
- %0 = load %struct.Base*, %struct.Base** bitcast (%struct.S* @obj to %struct.Base**), align 8
- store %struct.Base* null, %struct.Base** bitcast (%struct.S* @obj to %struct.Base**), align 8
- ret %struct.Base* %0
-}
-
-; CHECK: ^0 = module:
-; CHECK-NEXT: ^1 = gv: (name: "obj", summaries: (variable: (module: ^0, flags: (linkage: external, notEligibleToImport: 0, live: 0, dsoLocal: 1, canAutoHide: 0), varFlags: (readonly: 1, writeonly: 1)))) ; guid =
-; CHECK-NEXT: ^2 = gv: (name: "foo", summaries: (function: (module: ^0, flags: (linkage: external, notEligibleToImport: 0, live: 0, dsoLocal: 1, canAutoHide: 0), insts: 3, refs: (^1)))) ; guid =
diff --git a/llvm/test/ThinLTO/X86/writeonly.ll b/llvm/test/ThinLTO/X86/writeonly.ll
deleted file mode 100644
index 7c2af6d9cce..00000000000
--- a/llvm/test/ThinLTO/X86/writeonly.ll
+++ /dev/null
@@ -1,41 +0,0 @@
-; Checks that we optimize writeonly variables and corresponding stores using llvm-lto
-; -stats requires asserts
-; REQUIRES: asserts
-
-; RUN: opt -module-summary %s -o %t1.bc
-; RUN: opt -module-summary %p/Inputs/index-const-prop.ll -o %t2.bc
-; RUN: llvm-lto -thinlto-action=thinlink -o %t3.index.bc %t1.bc %t2.bc
-
-; Check that we optimize write-only variables
-; RUN: llvm-lto -thinlto-action=import -exported-symbol=main %t1.bc -thinlto-index=%t3.index.bc -o %t1.imported.bc -stats 2>&1 | FileCheck %s --check-prefix=STATS
-; RUN: llvm-dis %t1.imported.bc -o - | FileCheck %s --check-prefix=IMPORT
-; RUN: llvm-lto -thinlto-action=optimize %t1.imported.bc -o - | llvm-dis - -o - | FileCheck %s --check-prefix=OPTIMIZE
-
-; IMPORT: @gFoo.llvm.0 = internal unnamed_addr global i32 1, align 4, !dbg !0
-; IMPORT-NEXT: @gBar = internal local_unnamed_addr global i32 2, align 4, !dbg !5
-; IMPORT: !DICompileUnit({{.*}})
-
-; STATS: 2 module-summary-index - Number of live global variables marked write only
-
-; Check that we've optimized out variables and corresponding stores
-; OPTIMIZE-NOT: gFoo
-; OPTIMIZE-NOT: gBar
-; OPTIMIZE: i32 @main
-; OPTIMIZE-NEXT: %1 = tail call i32 @rand()
-; OPTIMIZE-NEXT: %2 = tail call i32 @rand()
-; OPTIMIZE-NEXT: ret i32 0
-
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-target triple = "x86_64-pc-linux-gnu"
-
-@gBar = external global i32
-
-; Should not be counted in the stats of live write only variables since it is
-; dead and will be dropped anyway.
-@gDead = internal unnamed_addr global i32 1, align 4
-
-define i32 @main() local_unnamed_addr {
- tail call void @baz()
- ret i32 0
-}
-declare void @baz() local_unnamed_addr
diff --git a/llvm/test/ThinLTO/X86/writeonly2.ll b/llvm/test/ThinLTO/X86/writeonly2.ll
deleted file mode 100644
index b1e53ba47b5..00000000000
--- a/llvm/test/ThinLTO/X86/writeonly2.ll
+++ /dev/null
@@ -1,50 +0,0 @@
-; Check that we optimize out writeonly variables and corresponding stores.
-; This test uses llvm-lto2
-
-; RUN: opt -module-summary %s -o %t1.bc
-; RUN: opt -module-summary %p/Inputs/index-const-prop.ll -o %t2.bc
-; RUN: llvm-lto2 run %t1.bc %t2.bc -save-temps \
-; RUN: -r=%t2.bc,foo,pl \
-; RUN: -r=%t2.bc,bar,pl \
-; RUN: -r=%t2.bc,baz,pl \
-; RUN: -r=%t2.bc,rand, \
-; RUN: -r=%t2.bc,gBar,pl \
-; RUN: -r=%t1.bc,main,plx \
-; RUN: -r=%t1.bc,baz, \
-; RUN: -r=%t1.bc,gBar, \
-; RUN: -o %t3
-; RUN: llvm-dis %t3.1.3.import.bc -o - | FileCheck %s --check-prefix=IMPORT
-; RUN: llvm-dis %t3.1.5.precodegen.bc -o - | FileCheck %s --check-prefix=CODEGEN
-; Check that gFoo and gBar were eliminated from source module together
-; with corresponsing stores
-; RUN: llvm-dis %t3.2.5.precodegen.bc -o - | FileCheck %s --check-prefix=CODEGEN-SRC
-
-; IMPORT: @gFoo.llvm.0 = internal unnamed_addr global i32 1, align 4
-; IMPORT-NEXT: @gBar = internal local_unnamed_addr global i32 2, align 4
-; IMPORT: !DICompileUnit({{.*}})
-
-; CODEGEN-NOT: gFoo
-; CODEGEN-NOT: gBar
-; CODEGEN: i32 @main
-; CODEGEN-NEXT: %1 = tail call i32 @rand()
-; CODEGEN-NEXT: %2 = tail call i32 @rand()
-; CODEGEN-NEXT: ret i32 0
-
-; CODEGEN-SRC-NOT: gFoo
-; CODEGEN-SRC-NOT: gBar
-; CODEGEN-SRC: void @baz()
-; CODEGEN-SRC-NEXT: %1 = tail call i32 @rand()
-; CODEGEN-SRC-NEXT: %2 = tail call i32 @rand()
-; CODEGEN-SRC-NEXT: ret void
-
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-target triple = "x86_64-pc-linux-gnu"
-
-; We should be able to link external definition of gBar to its declaration
-@gBar = external global i32
-
-define i32 @main() local_unnamed_addr {
- tail call void @baz()
- ret i32 0
-}
-declare void @baz() local_unnamed_addr
OpenPOWER on IntegriCloud