diff options
Diffstat (limited to 'llvm/test')
25 files changed, 97 insertions, 267 deletions
diff --git a/llvm/test/CMakeLists.txt b/llvm/test/CMakeLists.txt index 56fff69bad3..e5773bda0e7 100644 --- a/llvm/test/CMakeLists.txt +++ b/llvm/test/CMakeLists.txt @@ -43,7 +43,6 @@ set(LLVM_TEST_DEPENDS llvm-extract llvm-lib llvm-link - llvm-lto2 llvm-mc llvm-mcmarkup llvm-nm diff --git a/llvm/test/LTO/Resolution/X86/Inputs/alias-1.ll b/llvm/test/LTO/Resolution/X86/Inputs/alias-1.ll deleted file mode 100644 index 01c9987fd3f..00000000000 --- a/llvm/test/LTO/Resolution/X86/Inputs/alias-1.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 = global i32 42 diff --git a/llvm/test/LTO/Resolution/X86/Inputs/comdat.ll b/llvm/test/LTO/Resolution/X86/Inputs/comdat.ll deleted file mode 100644 index ca4bbb4bf81..00000000000 --- a/llvm/test/LTO/Resolution/X86/Inputs/comdat.ll +++ /dev/null @@ -1,28 +0,0 @@ -target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" -target triple = "x86_64-unknown-linux-gnu" - -$c2 = comdat any -$c1 = comdat any - -; This is only present in this file. The linker will keep $c1 from the first -; file and this will be undefined. -@will_be_undefined = global i32 1, comdat($c1) - -@v1 = weak_odr global i32 41, comdat($c2) -define weak_odr protected i32 @f1(i8* %this) comdat($c2) { -bb20: - store i8* %this, i8** null - br label %bb21 -bb21: - ret i32 41 -} - -@r21 = global i32* @v1 -@r22 = global i32(i8*)* @f1 - -@a21 = alias i32, i32* @v1 -@a22 = alias i16, bitcast (i32* @v1 to i16*) - -@a23 = alias i32(i8*), i32(i8*)* @f1 -@a24 = alias i16, bitcast (i32(i8*)* @f1 to i16*) -@a25 = alias i16, i16* @a24 diff --git a/llvm/test/LTO/Resolution/X86/alias.ll b/llvm/test/LTO/Resolution/X86/alias.ll deleted file mode 100644 index bd3fcb381b3..00000000000 --- a/llvm/test/LTO/Resolution/X86/alias.ll +++ /dev/null @@ -1,22 +0,0 @@ -; RUN: llvm-as %s -o %t1.o -; RUN: llvm-as %p/Inputs/alias-1.ll -o %t2.o -; RUN: llvm-lto2 -o %t3.o %t2.o %t1.o -r %t2.o,a,px -r %t1.o,a, -r %t1.o,b,px -save-temps -; RUN: llvm-dis < %t3.o.0.preopt.bc -o - | FileCheck %s -; RUN: FileCheck --check-prefix=RES %s < %t3.o.resolution.txt - -; CHECK-NOT: alias -; CHECK: @a = global i32 42 -; CHECK-NEXT: @b = global i32 1 -; CHECK-NOT: alias - -; RES: 2.o{{$}} -; RES: {{^}}-r={{.*}}2.o,a,px{{$}} -; RES: 1.o{{$}} -; RES: {{^}}-r={{.*}}1.o,b,px{{$}} -; RES: {{^}}-r={{.*}}1.o,a,{{$}} - -target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" -target triple = "x86_64-unknown-linux-gnu" - -@a = weak alias i32, i32* @b -@b = global i32 1 diff --git a/llvm/test/LTO/Resolution/X86/comdat.ll b/llvm/test/LTO/Resolution/X86/comdat.ll deleted file mode 100644 index 29bdcc325f3..00000000000 --- a/llvm/test/LTO/Resolution/X86/comdat.ll +++ /dev/null @@ -1,86 +0,0 @@ -; RUN: llvm-as %s -o %t.o -; RUN: llvm-as %p/Inputs/comdat.ll -o %t2.o -; RUN: llvm-lto2 -save-temps -o %t3.o %t.o %t2.o \ -; RUN: -r=%t.o,f1,plx \ -; RUN: -r=%t.o,v1,px \ -; RUN: -r=%t.o,r11,px \ -; RUN: -r=%t.o,r12,px \ -; RUN: -r=%t.o,a11,px \ -; RUN: -r=%t.o,a12,px \ -; RUN: -r=%t.o,a13,px \ -; RUN: -r=%t.o,a14,px \ -; RUN: -r=%t.o,a15,px \ -; RUN: -r=%t2.o,f1,l \ -; RUN: -r=%t2.o,will_be_undefined, \ -; RUN: -r=%t2.o,v1, \ -; RUN: -r=%t2.o,r21,px \ -; RUN: -r=%t2.o,r22,px \ -; RUN: -r=%t2.o,a21,px \ -; RUN: -r=%t2.o,a22,px \ -; RUN: -r=%t2.o,a23,px \ -; RUN: -r=%t2.o,a24,px \ -; RUN: -r=%t2.o,a25,px -; RUN: llvm-dis %t3.o.2.internalize.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" - -$c1 = comdat any - -@v1 = weak_odr global i32 42, comdat($c1) -define weak_odr i32 @f1(i8*) comdat($c1) { -bb10: - br label %bb11 -bb11: - ret i32 42 -} - -@r11 = global i32* @v1 -@r12 = global i32 (i8*)* @f1 - -@a11 = alias i32, i32* @v1 -@a12 = alias i16, bitcast (i32* @v1 to i16*) - -@a13 = alias i32 (i8*), i32 (i8*)* @f1 -@a14 = alias i16, bitcast (i32 (i8*)* @f1 to i16*) -@a15 = alias i16, i16* @a14 - -; CHECK: $c1 = comdat any -; CHECK: $c2 = comdat any - -; CHECK-DAG: @v1 = weak_odr global i32 42, comdat($c1) - -; CHECK-DAG: @r11 = global i32* @v1{{$}} -; CHECK-DAG: @r12 = global i32 (i8*)* @f1{{$}} - -; CHECK-DAG: @r21 = global i32* @v1{{$}} -; CHECK-DAG: @r22 = global i32 (i8*)* @f1{{$}} - -; CHECK-DAG: @v1.1 = internal global i32 41, comdat($c2) - -; CHECK-DAG: @a11 = alias i32, i32* @v1{{$}} -; CHECK-DAG: @a12 = alias i16, bitcast (i32* @v1 to i16*) - -; CHECK-DAG: @a13 = alias i32 (i8*), i32 (i8*)* @f1{{$}} -; CHECK-DAG: @a14 = alias i16, bitcast (i32 (i8*)* @f1 to i16*) - -; CHECK-DAG: @a21 = alias i32, i32* @v1.1{{$}} -; CHECK-DAG: @a22 = alias i16, bitcast (i32* @v1.1 to i16*) - -; CHECK-DAG: @a23 = alias i32 (i8*), i32 (i8*)* @f1.2{{$}} -; CHECK-DAG: @a24 = alias i16, bitcast (i32 (i8*)* @f1.2 to i16*) - -; CHECK: define weak_odr i32 @f1(i8*) comdat($c1) { -; CHECK-NEXT: bb10: -; CHECK-NEXT: br label %bb11{{$}} -; CHECK: bb11: -; CHECK-NEXT: ret i32 42 -; CHECK-NEXT: } - -; CHECK: define internal i32 @f1.2(i8* %this) comdat($c2) { -; CHECK-NEXT: bb20: -; CHECK-NEXT: store i8* %this, i8** null -; CHECK-NEXT: br label %bb21 -; CHECK: bb21: -; CHECK-NEXT: ret i32 41 -; CHECK-NEXT: } diff --git a/llvm/test/LTO/Resolution/X86/lit.local.cfg b/llvm/test/LTO/Resolution/X86/lit.local.cfg deleted file mode 100644 index afde89be896..00000000000 --- a/llvm/test/LTO/Resolution/X86/lit.local.cfg +++ /dev/null @@ -1,2 +0,0 @@ -if not 'X86' in config.root.targets: - config.unsupported = True diff --git a/llvm/test/lit.cfg b/llvm/test/lit.cfg index 12676372b07..f9f82d16833 100644 --- a/llvm/test/lit.cfg +++ b/llvm/test/lit.cfg @@ -295,7 +295,6 @@ for pattern in [r"\bbugpoint\b(?!-)", r"\bllvm-lib\b", r"\bllvm-link\b", r"\bllvm-lto\b", - r"\bllvm-lto2\b", r"\bllvm-mc\b", r"\bllvm-mcmarkup\b", r"\bllvm-nm\b", diff --git a/llvm/test/tools/gold/X86/coff.ll b/llvm/test/tools/gold/X86/coff.ll index 70d4f916159..7ab80707ba1 100644 --- a/llvm/test/tools/gold/X86/coff.ll +++ b/llvm/test/tools/gold/X86/coff.ll @@ -16,7 +16,7 @@ define hidden void @g() { ret void } -; CHECK: define internal void @h() { +; CHECK: define internal void @h() local_unnamed_addr { define linkonce_odr void @h() local_unnamed_addr { ret void } diff --git a/llvm/test/tools/gold/X86/comdat.ll b/llvm/test/tools/gold/X86/comdat.ll index 2170bf89d0c..b5a09d8329c 100644 --- a/llvm/test/tools/gold/X86/comdat.ll +++ b/llvm/test/tools/gold/X86/comdat.ll @@ -1,9 +1,8 @@ -; RUN: llvm-as %s -o %t1.o +; RUN: llvm-as %s -o %t.o ; RUN: llvm-as %p/Inputs/comdat.ll -o %t2.o -; RUN: %gold -shared -o %t3.o -plugin %llvmshlibdir/LLVMgold.so %t1.o %t2.o \ +; RUN: %gold -shared -o %t3.o -plugin %llvmshlibdir/LLVMgold.so %t.o %t2.o \ ; RUN: -plugin-opt=save-temps -; RUN: FileCheck --check-prefix=RES %s < %t3.o.resolution.txt -; RUN: llvm-readobj -t %t3.o | FileCheck --check-prefix=OBJ %s +; RUN: llvm-dis %t3.o.bc -o - | FileCheck %s $c1 = comdat any @@ -25,37 +24,42 @@ bb11: @a14 = alias i16, bitcast (i32 (i8*)* @f1 to i16*) @a15 = alias i16, i16* @a14 -; gold's resolutions should tell us that our $c1 wins, and the other input's $c2 -; wins. f1 is also local due to having protected visibility in the other object. - -; RES: 1.o,f1,plx{{$}} -; RES: 1.o,v1,px{{$}} -; RES: 1.o,r11,px{{$}} -; RES: 1.o,r12,px{{$}} -; RES: 1.o,a11,px{{$}} -; RES: 1.o,a12,px{{$}} -; RES: 1.o,a13,px{{$}} -; RES: 1.o,a14,px{{$}} -; RES: 1.o,a15,px{{$}} - -; RES: 2.o,f1,l{{$}} -; RES: 2.o,will_be_undefined,{{$}} -; RES: 2.o,v1,{{$}} -; RES: 2.o,r21,px{{$}} -; RES: 2.o,r22,px{{$}} -; RES: 2.o,a21,px{{$}} -; RES: 2.o,a22,px{{$}} -; RES: 2.o,a23,px{{$}} -; RES: 2.o,a24,px{{$}} -; RES: 2.o,a25,px{{$}} - -; f1's protected visibility should be reflected in the DSO. - -; OBJ: Name: f1 ( -; OBJ-NEXT: Value: -; OBJ-NEXT: Size: -; OBJ-NEXT: Binding: -; OBJ-NEXT: Type: -; OBJ-NEXT: Other [ -; OBJ-NEXT: STV_PROTECTED -; OBJ-NEXT: ] +; CHECK: $c1 = comdat any +; CHECK: $c2 = comdat any + +; CHECK-DAG: @v1 = weak_odr global i32 42, comdat($c1) + +; CHECK-DAG: @r11 = global i32* @v1{{$}} +; CHECK-DAG: @r12 = global i32 (i8*)* @f1{{$}} + +; CHECK-DAG: @r21 = global i32* @v1{{$}} +; CHECK-DAG: @r22 = global i32 (i8*)* @f1{{$}} + +; CHECK-DAG: @v1.1 = internal global i32 41, comdat($c2) + +; CHECK-DAG: @a11 = alias i32, i32* @v1{{$}} +; CHECK-DAG: @a12 = alias i16, bitcast (i32* @v1 to i16*) + +; CHECK-DAG: @a13 = alias i32 (i8*), i32 (i8*)* @f1{{$}} +; CHECK-DAG: @a14 = alias i16, bitcast (i32 (i8*)* @f1 to i16*) + +; CHECK-DAG: @a21 = alias i32, i32* @v1.1{{$}} +; CHECK-DAG: @a22 = alias i16, bitcast (i32* @v1.1 to i16*) + +; CHECK-DAG: @a23 = alias i32 (i8*), i32 (i8*)* @f1.2{{$}} +; CHECK-DAG: @a24 = alias i16, bitcast (i32 (i8*)* @f1.2 to i16*) + +; CHECK: define weak_odr protected i32 @f1(i8*) comdat($c1) { +; CHECK-NEXT: bb10: +; CHECK-NEXT: br label %bb11{{$}} +; CHECK: bb11: +; CHECK-NEXT: ret i32 42 +; CHECK-NEXT: } + +; CHECK: define internal i32 @f1.2(i8* %this) comdat($c2) { +; CHECK-NEXT: bb20: +; CHECK-NEXT: store i8* %this, i8** null +; CHECK-NEXT: br label %bb21 +; CHECK: bb21: +; CHECK-NEXT: ret i32 41 +; CHECK-NEXT: } diff --git a/llvm/test/tools/gold/X86/common.ll b/llvm/test/tools/gold/X86/common.ll index d0c5f1873e0..335f6e9a88a 100644 --- a/llvm/test/tools/gold/X86/common.ll +++ b/llvm/test/tools/gold/X86/common.ll @@ -11,7 +11,7 @@ ; RUN: llvm-dis %t3.o -o - | FileCheck %s --check-prefix=A ; Shared library case, we merge @a as common and keep it for the symbol table. -; A: @a = common global [4 x i8] zeroinitializer, align 8 +; A: @a = common global i32 0, align 8 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \ ; RUN: --plugin-opt=emit-llvm \ @@ -19,7 +19,7 @@ ; RUN: llvm-dis %t3.o -o - | FileCheck %s --check-prefix=B ; (i16 align 8) + (i8 align 16) = i16 align 16 -; B: @a = common global [2 x i8] zeroinitializer, align 16 +; B: @a = common global i16 0, align 16 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \ ; RUN: --plugin-opt=emit-llvm \ @@ -27,7 +27,7 @@ ; RUN: llvm-dis %t3.o -o - | FileCheck %s --check-prefix=C ; (i16 align 8) + (i8 align 1) = i16 align 8. -; C: @a = common global [2 x i8] zeroinitializer, align 8 +; C: @a = common global i16 0, align 8 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \ ; RUN: --plugin-opt=emit-llvm \ @@ -35,7 +35,7 @@ ; RUN: llvm-dis %t3.o -o - | FileCheck --check-prefix=EXEC %s ; All IR case, we internalize a after merging. -; EXEC: @a = internal global [4 x i8] zeroinitializer, align 8 +; EXEC: @a = internal global i32 0, align 8 ; RUN: llc %p/Inputs/common.ll -o %t2native.o -filetype=obj ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \ @@ -44,4 +44,4 @@ ; RUN: llvm-dis %t3.o -o - | FileCheck --check-prefix=MIXED %s ; Mixed ELF and IR. We keep ours as common so the linker will finish the merge. -; MIXED: @a = common global [2 x i8] zeroinitializer, align 8 +; MIXED: @a = common global i16 0, align 8 diff --git a/llvm/test/tools/gold/X86/emit-llvm.ll b/llvm/test/tools/gold/X86/emit-llvm.ll index da59c707ea6..0a955088c40 100644 --- a/llvm/test/tools/gold/X86/emit-llvm.ll +++ b/llvm/test/tools/gold/X86/emit-llvm.ll @@ -2,16 +2,17 @@ ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \ ; RUN: --plugin-opt=emit-llvm \ +; RUN: --plugin-opt=generate-api-file \ ; RUN: -shared %t.o -o %t2.o ; RUN: llvm-dis %t2.o -o - | FileCheck %s +; RUN: FileCheck --check-prefix=API %s < %T/../apifile.txt ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \ ; RUN: -m elf_x86_64 --plugin-opt=save-temps \ ; RUN: -shared %t.o -o %t3.o -; RUN: FileCheck --check-prefix=RES %s < %t3.o.resolution.txt -; RUN: llvm-dis %t3.o.2.internalize.bc -o - | FileCheck %s -; RUN: llvm-dis %t3.o.4.opt.bc -o - | FileCheck --check-prefix=OPT %s -; RUN: llvm-dis %t3.o.4.opt.bc -o - | FileCheck --check-prefix=OPT2 %s +; RUN: llvm-dis %t3.o.bc -o - | FileCheck %s +; RUN: llvm-dis %t3.o.opt.bc -o - | FileCheck --check-prefix=OPT %s +; RUN: llvm-dis %t3.o.opt.bc -o - | FileCheck --check-prefix=OPT2 %s ; RUN: llvm-nm %t3.o.o | FileCheck --check-prefix=NM %s ; RUN: rm -f %t4.o @@ -24,19 +25,19 @@ target triple = "x86_64-unknown-linux-gnu" -; CHECK-DAG: @g1 = weak_odr constant i32 32 +; CHECK-DAG: @g1 = linkonce_odr constant i32 32 @g1 = linkonce_odr constant i32 32 -; CHECK-DAG: @g2 = internal constant i32 32 +; CHECK-DAG: @g2 = internal local_unnamed_addr constant i32 32 @g2 = linkonce_odr local_unnamed_addr constant i32 32 ; CHECK-DAG: @g3 = internal unnamed_addr constant i32 32 @g3 = linkonce_odr unnamed_addr constant i32 32 -; CHECK-DAG: @g4 = weak_odr global i32 32 +; CHECK-DAG: @g4 = linkonce_odr global i32 32 @g4 = linkonce_odr global i32 32 -; CHECK-DAG: @g5 = weak_odr global i32 32 +; CHECK-DAG: @g5 = linkonce_odr local_unnamed_addr global i32 32 @g5 = linkonce_odr local_unnamed_addr global i32 32 ; CHECK-DAG: @g6 = internal unnamed_addr global i32 32 @@ -74,8 +75,8 @@ define linkonce_odr void @f4() local_unnamed_addr { ret void } -; CHECK-DAG: define weak_odr void @f5() -; OPT-DAG: define weak_odr void @f5() +; CHECK-DAG: define linkonce_odr void @f5() +; OPT-DAG: define linkonce_odr void @f5() define linkonce_odr void @f5() { ret void } @@ -96,21 +97,15 @@ define i32* @f8() { ret i32* @g8 } -; RES: .o,f1,pl{{$}} -; RES: .o,f2,pl{{$}} -; RES: .o,f3,px{{$}} -; RES: .o,f4,p{{$}} -; RES: .o,f5,px{{$}} -; RES: .o,f6,p{{$}} -; RES: .o,f7,px{{$}} -; RES: .o,f8,px{{$}} -; RES: .o,g1,px{{$}} -; RES: .o,g2,p{{$}} -; RES: .o,g3,p{{$}} -; RES: .o,g4,px{{$}} -; RES: .o,g5,px{{$}} -; RES: .o,g6,p{{$}} -; RES: .o,g7,{{$}} -; RES: .o,g8,{{$}} -; RES: .o,g9,px{{$}} -; RES: .o,g10,px{{$}} +; API: f1 PREVAILING_DEF_IRONLY +; API: f2 PREVAILING_DEF_IRONLY +; API: f3 PREVAILING_DEF_IRONLY_EXP +; API: f4 PREVAILING_DEF_IRONLY_EXP +; API: f5 PREVAILING_DEF_IRONLY_EXP +; API: f6 PREVAILING_DEF_IRONLY_EXP +; API: f7 PREVAILING_DEF_IRONLY_EXP +; API: f8 PREVAILING_DEF_IRONLY_EXP +; API: g7 UNDEF +; API: g8 UNDEF +; API: g9 PREVAILING_DEF_IRONLY_EXP +; API: g10 PREVAILING_DEF_IRONLY_EXP diff --git a/llvm/test/tools/gold/X86/opt-level.ll b/llvm/test/tools/gold/X86/opt-level.ll index a680a169836..a3cd844a142 100644 --- a/llvm/test/tools/gold/X86/opt-level.ll +++ b/llvm/test/tools/gold/X86/opt-level.ll @@ -1,13 +1,13 @@ ; RUN: llvm-as -o %t.bc %s ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so -plugin-opt=save-temps \ ; RUN: -plugin-opt=O0 -r -o %t.o %t.bc -; RUN: llvm-dis < %t.o.4.opt.bc -o - | FileCheck --check-prefix=CHECK-O0 %s +; RUN: llvm-dis < %t.o.opt.bc -o - | FileCheck --check-prefix=CHECK-O0 %s ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so -plugin-opt=save-temps \ ; RUN: -plugin-opt=O1 -r -o %t.o %t.bc -; RUN: llvm-dis < %t.o.4.opt.bc -o - | FileCheck --check-prefix=CHECK-O1 %s +; RUN: llvm-dis < %t.o.opt.bc -o - | FileCheck --check-prefix=CHECK-O1 %s ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so -plugin-opt=save-temps \ ; RUN: -plugin-opt=O2 -r -o %t.o %t.bc -; RUN: llvm-dis < %t.o.4.opt.bc -o - | FileCheck --check-prefix=CHECK-O2 %s +; RUN: llvm-dis < %t.o.opt.bc -o - | FileCheck --check-prefix=CHECK-O2 %s ; CHECK-O0: define internal void @foo( ; CHECK-O1: define internal void @foo( diff --git a/llvm/test/tools/gold/X86/parallel.ll b/llvm/test/tools/gold/X86/parallel.ll index 4b078fa2111..57d13768cd4 100644 --- a/llvm/test/tools/gold/X86/parallel.ll +++ b/llvm/test/tools/gold/X86/parallel.ll @@ -1,8 +1,7 @@ ; RUN: llvm-as -o %t.bc %s -; RUN: rm -f %t.opt.bc0 %t.opt.bc1 %t.o0 %t.o1 ; RUN: env LD_PRELOAD=%llvmshlibdir/LLVMgold.so %gold -plugin %llvmshlibdir/LLVMgold.so -u foo -u bar -plugin-opt jobs=2 -plugin-opt save-temps -m elf_x86_64 -o %t %t.bc -; RUN: llvm-dis %t.5.precodegen.bc -o - | FileCheck --check-prefix=CHECK-BC0 %s -; RUN: llvm-dis %t.1.5.precodegen.bc -o - | FileCheck --check-prefix=CHECK-BC1 %s +; RUN: llvm-dis %t.opt.bc0 -o - | FileCheck --check-prefix=CHECK-BC0 %s +; RUN: llvm-dis %t.opt.bc1 -o - | FileCheck --check-prefix=CHECK-BC1 %s ; RUN: llvm-nm %t.o0 | FileCheck --check-prefix=CHECK0 %s ; RUN: llvm-nm %t.o1 | FileCheck --check-prefix=CHECK1 %s diff --git a/llvm/test/tools/gold/X86/slp-vectorize.ll b/llvm/test/tools/gold/X86/slp-vectorize.ll index 3464359afbf..30950b2d2de 100644 --- a/llvm/test/tools/gold/X86/slp-vectorize.ll +++ b/llvm/test/tools/gold/X86/slp-vectorize.ll @@ -3,7 +3,7 @@ ; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold.so \ ; RUN: --plugin-opt=save-temps \ ; RUN: -shared %t.o -o %t2.o -; RUN: llvm-dis %t2.o.4.opt.bc -o - | FileCheck %s +; RUN: llvm-dis %t2.o.opt.bc -o - | FileCheck %s ; test that the vectorizer is run. ; CHECK: fadd <4 x float> diff --git a/llvm/test/tools/gold/X86/start-lib-common.ll b/llvm/test/tools/gold/X86/start-lib-common.ll index 7c8945585a5..89bdbef2234 100644 --- a/llvm/test/tools/gold/X86/start-lib-common.ll +++ b/llvm/test/tools/gold/X86/start-lib-common.ll @@ -19,4 +19,4 @@ ; Check that the common symbol is not dropped completely, which was a regression ; in r262676. -; CHECK: @x = common global [4 x i8] zeroinitializer +; CHECK: @x = common global i32 0 diff --git a/llvm/test/tools/gold/X86/strip_names.ll b/llvm/test/tools/gold/X86/strip_names.ll index c196f25703d..495eac9d541 100644 --- a/llvm/test/tools/gold/X86/strip_names.ll +++ b/llvm/test/tools/gold/X86/strip_names.ll @@ -3,7 +3,7 @@ ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \ ; RUN: --plugin-opt=save-temps \ ; RUN: -shared %t.o -o %t2.o -; RUN: llvm-dis %t2.o.2.internalize.bc -o - | FileCheck %s +; RUN: llvm-dis %t2.o.bc -o - | FileCheck %s ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \ ; RUN: --plugin-opt=emit-llvm \ diff --git a/llvm/test/tools/gold/X86/thinlto.ll b/llvm/test/tools/gold/X86/thinlto.ll index 9b0d96db47c..09bf21d4a82 100644 --- a/llvm/test/tools/gold/X86/thinlto.ll +++ b/llvm/test/tools/gold/X86/thinlto.ll @@ -25,23 +25,21 @@ ; RUN: llvm-bcanalyzer -dump %t2.o.thinlto.bc | FileCheck %s --check-prefix=BACKEND2 ; RUN: not test -e %t3 -; Ensure gold generates an index as well as a binary with save-temps in ThinLTO mode. +; Ensure gold generates an index as well as a binary by default in ThinLTO mode. ; First force single-threaded mode ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \ -; RUN: --plugin-opt=save-temps \ ; RUN: --plugin-opt=thinlto \ ; RUN: --plugin-opt=jobs=1 \ ; RUN: -shared %t.o %t2.o -o %t4 -; RUN: llvm-bcanalyzer -dump %t4.index.bc | FileCheck %s --check-prefix=COMBINED +; RUN: llvm-bcanalyzer -dump %t4.thinlto.bc | FileCheck %s --check-prefix=COMBINED ; RUN: llvm-nm %t4 | FileCheck %s --check-prefix=NM ; Next force multi-threaded mode ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \ -; RUN: --plugin-opt=save-temps \ ; RUN: --plugin-opt=thinlto \ ; RUN: --plugin-opt=jobs=2 \ ; RUN: -shared %t.o %t2.o -o %t4 -; RUN: llvm-bcanalyzer -dump %t4.index.bc | FileCheck %s --check-prefix=COMBINED +; RUN: llvm-bcanalyzer -dump %t4.thinlto.bc | FileCheck %s --check-prefix=COMBINED ; RUN: llvm-nm %t4 | FileCheck %s --check-prefix=NM ; Test --plugin-opt=obj-path to ensure unique object files generated. @@ -50,8 +48,8 @@ ; RUN: --plugin-opt=jobs=2 \ ; RUN: --plugin-opt=obj-path=%t5.o \ ; RUN: -shared %t.o %t2.o -o %t4 +; RUN: llvm-nm %t5.o0 | FileCheck %s --check-prefix=NM2 ; RUN: llvm-nm %t5.o1 | FileCheck %s --check-prefix=NM2 -; RUN: llvm-nm %t5.o2 | FileCheck %s --check-prefix=NM2 ; NM: T f ; NM2: T {{f|g}} diff --git a/llvm/test/tools/gold/X86/thinlto_alias.ll b/llvm/test/tools/gold/X86/thinlto_alias.ll index 33c888daf17..f91c9bd2808 100644 --- a/llvm/test/tools/gold/X86/thinlto_alias.ll +++ b/llvm/test/tools/gold/X86/thinlto_alias.ll @@ -14,14 +14,8 @@ ; RUN: --plugin-opt=save-temps \ ; RUN: -o %t3.o %t2.o %t.o ; RUN: llvm-nm %t3.o | FileCheck %s -; RUN: llvm-dis %t.o.4.opt.bc -o - | FileCheck --check-prefix=OPT %s -; RUN: llvm-dis %t2.o.4.opt.bc -o - | FileCheck --check-prefix=OPT2 %s - -; This does not currently pass because the gold plugin now uses the -; combined summary rather than the IRMover to change the module's linkage -; during the ThinLTO backend. The internalization step implemented by IRMover -; for preempted symbols has not yet been implemented for the combined summary. -; XFAIL: * +; RUN: llvm-dis %t.o.opt.bc -o - | FileCheck --check-prefix=OPT %s +; RUN: llvm-dis %t2.o.opt.bc -o - | FileCheck --check-prefix=OPT2 %s ; CHECK-NOT: U f ; OPT: define hidden void @weakfunc.llvm.0() diff --git a/llvm/test/tools/gold/X86/thinlto_internalize.ll b/llvm/test/tools/gold/X86/thinlto_internalize.ll index 8d0033c1f98..4d626ee0d60 100644 --- a/llvm/test/tools/gold/X86/thinlto_internalize.ll +++ b/llvm/test/tools/gold/X86/thinlto_internalize.ll @@ -6,7 +6,7 @@ ; RUN: --plugin-opt=-import-instr-limit=0 \ ; RUN: --plugin-opt=save-temps \ ; RUN: -o %t3.o %t2.o %t.o -; RUN: llvm-dis %t.o.4.opt.bc -o - | FileCheck %s +; RUN: llvm-dis %t.o.opt.bc -o - | FileCheck %s ; f() should be internalized and eliminated after inlining ; CHECK-NOT: @f() diff --git a/llvm/test/tools/gold/X86/thinlto_linkonceresolution.ll b/llvm/test/tools/gold/X86/thinlto_linkonceresolution.ll index 810b2dd7b2d..1d2bb230860 100644 --- a/llvm/test/tools/gold/X86/thinlto_linkonceresolution.ll +++ b/llvm/test/tools/gold/X86/thinlto_linkonceresolution.ll @@ -14,13 +14,13 @@ ; RUN: -shared \ ; RUN: -o %t3.o %t2.o %t.o ; RUN: llvm-nm %t3.o | FileCheck %s -; RUN: llvm-dis %t.o.4.opt.bc -o - | FileCheck --check-prefix=OPT %s -; RUN: llvm-dis %t2.o.4.opt.bc -o - | FileCheck --check-prefix=OPT2 %s +; RUN: llvm-dis %t.o.opt.bc -o - | FileCheck --check-prefix=OPT %s +; RUN: llvm-dis %t2.o.opt.bc -o - | FileCheck --check-prefix=OPT2 %s ; Ensure that f() is defined in resulting object file, and also ; confirm the weak linkage directly in the saved opt bitcode files. ; CHECK-NOT: U f -; OPT-NOT: @f() +; OPT: declare hidden void @f() ; OPT2: define weak_odr hidden void @f() target triple = "x86_64-unknown-linux-gnu" diff --git a/llvm/test/tools/gold/X86/thinlto_weak_resolution.ll b/llvm/test/tools/gold/X86/thinlto_weak_resolution.ll index afa6fd07bae..a6c6f37895b 100644 --- a/llvm/test/tools/gold/X86/thinlto_weak_resolution.ll +++ b/llvm/test/tools/gold/X86/thinlto_weak_resolution.ll @@ -13,17 +13,12 @@ ; RUN: llvm-nm %t3.o | FileCheck %s ; CHECK: weakfunc -; Most of the preempted functions should have been eliminated (the plugin will -; set linkage of odr functions to available_externally and linkonce functions -; are removed by globaldce). FIXME: Need to introduce combined index linkage -; that means "drop this function" so we can avoid importing linkonce functions -; and drop weak functions. -; RUN: llvm-dis %t2.o.4.opt.bc -o - | FileCheck --check-prefix=OPT2 %s -; OPT2-NOT: @ -; OPT2: @weakfunc +; All of the preempted functions should have been eliminated (the plugin will +; not link them in). +; RUN: llvm-dis %t2.o.opt.bc -o - | FileCheck --check-prefix=OPT2 %s ; OPT2-NOT: @ -; RUN: llvm-dis %t.o.4.opt.bc -o - | FileCheck --check-prefix=OPT %s +; RUN: llvm-dis %t.o.opt.bc -o - | FileCheck --check-prefix=OPT %s target triple = "x86_64-unknown-linux-gnu" diff --git a/llvm/test/tools/gold/X86/type-merge2.ll b/llvm/test/tools/gold/X86/type-merge2.ll index c66ba22cf08..449fd216503 100644 --- a/llvm/test/tools/gold/X86/type-merge2.ll +++ b/llvm/test/tools/gold/X86/type-merge2.ll @@ -3,7 +3,7 @@ ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \ ; RUN: --plugin-opt=save-temps \ ; RUN: -shared %t.o %t2.o -o %t3.o -; RUN: llvm-dis %t3.o.2.internalize.bc -o - | FileCheck %s +; RUN: llvm-dis %t3.o.bc -o - | FileCheck %s %zed = type { i8 } define void @foo() { diff --git a/llvm/test/tools/gold/X86/vectorize.ll b/llvm/test/tools/gold/X86/vectorize.ll index 9b5c97259b2..5f003dd02e2 100644 --- a/llvm/test/tools/gold/X86/vectorize.ll +++ b/llvm/test/tools/gold/X86/vectorize.ll @@ -3,7 +3,7 @@ ; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold.so \ ; RUN: --plugin-opt=save-temps \ ; RUN: -shared %t.o -o %t2.o -; RUN: llvm-dis %t2.o.4.opt.bc -o - | FileCheck %s +; RUN: llvm-dis %t2.o.opt.bc -o - | FileCheck %s ; test that the vectorizer is run. ; CHECK: fadd <4 x float> diff --git a/llvm/test/tools/gold/X86/visibility.ll b/llvm/test/tools/gold/X86/visibility.ll index f7e085a45fc..9af8788889d 100644 --- a/llvm/test/tools/gold/X86/visibility.ll +++ b/llvm/test/tools/gold/X86/visibility.ll @@ -5,7 +5,7 @@ ; RUN: --plugin-opt=save-temps \ ; RUN: -shared %t.o %t2.o -o %t.so ; RUN: llvm-readobj -t %t.so | FileCheck %s -; RUN: llvm-dis %t.so.2.internalize.bc -o - | FileCheck --check-prefix=IR %s +; RUN: llvm-dis %t.so.bc -o - | FileCheck --check-prefix=IR %s ; CHECK: Name: foo ; CHECK-NEXT: Value: @@ -16,7 +16,7 @@ ; CHECK-NEXT: STV_PROTECTED ; CHECK-NEXT: ] -; IR: define void @foo +; IR: define protected void @foo define weak protected void @foo() { ret void diff --git a/llvm/test/tools/llvm-lto2/errors.ll b/llvm/test/tools/llvm-lto2/errors.ll deleted file mode 100644 index cd2394dc012..00000000000 --- a/llvm/test/tools/llvm-lto2/errors.ll +++ /dev/null @@ -1,11 +0,0 @@ -; RUN: llvm-as %s -o %t.bc -; RUN: not llvm-lto2 -o %t2.o %t.bc 2>&1 | FileCheck --check-prefix=ERR1 %s -; RUN: not llvm-lto2 -o %t2.o -r %t.bc,foo,p -r %t.bc,bar,p %t.bc 2>&1 | FileCheck --check-prefix=ERR2 %s -; RUN: not llvm-lto2 -o %t2.o -r %t.bc,foo,q %t.bc 2>&1 | FileCheck --check-prefix=ERR3 %s -; RUN: not llvm-lto2 -o %t2.o -r foo %t.bc 2>&1 | FileCheck --check-prefix=ERR4 %s - -; ERR1: missing symbol resolution for {{.*}}.bc,foo -; ERR2: unused symbol resolution for {{.*}}.bc,bar -; ERR3: invalid character q in resolution: {{.*}}.bc,foo -; ERR4: invalid resolution: foo -@foo = global i32 0 |