]> granicus.if.org Git - llvm/commitdiff
Fix x86 gold tests on non-x86 targets.
authorAsiri Rathnayake <asiri.rathnayake@arm.com>
Wed, 4 Jan 2017 14:43:51 +0000 (14:43 +0000)
committerAsiri Rathnayake <asiri.rathnayake@arm.com>
Wed, 4 Jan 2017 14:43:51 +0000 (14:43 +0000)
These tests are missing a target triple and the -m elf_x86_64 gold option,
which makes them fail on non-x86 targets.

Differential revision: https://reviews.llvm.org/D28285

Reviewers: tejohnson

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290965 91177308-0d34-0410-b5e6-96231b3b80d8

13 files changed:
test/tools/gold/X86/Inputs/thinlto.ll
test/tools/gold/X86/Inputs/thinlto_archive1.ll
test/tools/gold/X86/Inputs/thinlto_archive2.ll
test/tools/gold/X86/comdat.ll
test/tools/gold/X86/opt-level.ll
test/tools/gold/X86/pr25907.ll
test/tools/gold/X86/stats.ll
test/tools/gold/X86/strip_names.ll
test/tools/gold/X86/thinlto.ll
test/tools/gold/X86/thinlto_afdo.ll
test/tools/gold/X86/thinlto_archive.ll
test/tools/gold/X86/type-merge2.ll
test/tools/gold/X86/visibility.ll

index b81de922b4daecc09ba879f9a7c84992d13e8756..31c72ec4653a644b0266f5eeb78a988454612b45 100644 (file)
@@ -1,4 +1,5 @@
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
 
 define void @g() {
 entry:
index b81de922b4daecc09ba879f9a7c84992d13e8756..31c72ec4653a644b0266f5eeb78a988454612b45 100644 (file)
@@ -1,4 +1,5 @@
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
 
 define void @g() {
 entry:
index c2bda1712a40313f5b34e1a6602b63d80380d8b3..2136ec3471d139a10df1d4b53b4f827f6a2fef71 100644 (file)
@@ -1,4 +1,5 @@
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
 
 define void @h() {
 entry:
index 8ed520c17c05b75be7e5bc26fcc53ce968ce61f0..7cb1855df2d51e15fb289dd1c9a082110ff6af30 100644 (file)
@@ -1,11 +1,13 @@
 ; RUN: llvm-as %s -o %t1.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:  -m elf_x86_64 \
 ; 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
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
 
 $c1 = comdat any
 
index d072866f7dbaf1937de83d3d72403b55d386a1a6..a48c551a9aedf69190121d83ead9e5cbdc2f08eb 100644 (file)
@@ -1,11 +1,14 @@
 ; RUN: llvm-as -o %t.bc %s
 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so -plugin-opt=save-temps \
+; RUN:    -m elf_x86_64 \
 ; RUN:    -plugin-opt=O0 -r -o %t.o %t.bc
 ; RUN: llvm-dis < %t.o.0.4.opt.bc -o - | FileCheck --check-prefix=CHECK-O0 %s
 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so -plugin-opt=save-temps \
+; RUN:    -m elf_x86_64 \
 ; RUN:    -plugin-opt=O1 -r -o %t.o %t.bc
 ; RUN: llvm-dis < %t.o.0.4.opt.bc -o - | FileCheck --check-prefix=CHECK-O1 %s
 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so -plugin-opt=save-temps \
+; RUN:    -m elf_x86_64 \
 ; RUN:    -plugin-opt=O2 -r -o %t.o %t.bc
 ; RUN: llvm-dis < %t.o.0.4.opt.bc -o - | FileCheck --check-prefix=CHECK-O2 %s
 
@@ -14,6 +17,7 @@
 ; CHECK-O2-NOT: define internal void @foo(
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
 
 define internal void @foo() {
   ret void
index f33f2f242458127b51fff678ba0197ec5481b43b..bfdf4fc9049791966694f066030a308dda63a2b8 100644 (file)
@@ -1,10 +1,12 @@
 ; RUN: llvm-as %s -o %t.o
 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
+; RUN:    -m elf_x86_64 \
 ; RUN:    -shared %t.o -o %t2
 ; RUN: llvm-nm %t2 | FileCheck %s
 ; CHECK: T main
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
 
 @main.L = internal unnamed_addr constant [3 x i8*] [i8* blockaddress(@main, %L1), i8* blockaddress(@main, %L2), i8* null], align 16
 
index d278610789fa13c7ca3d98fec899bf87a5a0b2ea..15aa080d6fc0225c06935949fce94c7885ee3bf0 100644 (file)
@@ -2,6 +2,7 @@
 
 ; RUN: llvm-as %s -o %t.o
 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so  -shared \
+; RUN:    -m elf_x86_64 \
 ; RUN:    -plugin-opt=-stats %t.o -o %t2 2>&1 | FileCheck %s
 
 ; CHECK: Statistics Collected
index bb974c8aebeb13d1cb46f875fe498acf181bc8c2..dd4a94f83d668d7209719146b93385e57aefacd9 100644 (file)
@@ -1,11 +1,13 @@
 ; RUN: llvm-as %s -o %t.o
 
 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
+; RUN:    -m elf_x86_64 \
 ; RUN:    --plugin-opt=save-temps \
 ; RUN:    -shared %t.o -o %t2.o
 ; RUN: llvm-dis %t2.o.0.2.internalize.bc -o - | FileCheck %s
 
 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
+; RUN:    -m elf_x86_64 \
 ; RUN:    --plugin-opt=emit-llvm \
 ; RUN:    -shared %t.o -o %t2.o
 ; RUN: llvm-dis %t2.o -o - | FileCheck ---check-prefix=NONAME %s
@@ -25,6 +27,7 @@
 ; NONAME:  ret i32 %3
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
 
 @GlobalValueName = global i32 0
 
index 9ce070a6b5e6628e9a50cf4acf7916144c46dd46..aee7268dfb961f71120f7964d92a7e49346b6b69 100644 (file)
@@ -3,11 +3,13 @@
 ; RUN: llvm-as %s -o %t.o
 ; RUN: llvm-as %p/Inputs/thinlto.ll -o %t2.o
 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
+; RUN:    -m elf_x86_64 \
 ; RUN:    --plugin-opt=thinlto \
 ; RUN:    --plugin-opt=thinlto-index-only \
 ; RUN:    -shared %t.o %t2.o -o %t3
 ; RUN: not test -e %t3
 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
+; RUN:    -m elf_x86_64 \
 ; RUN:    --plugin-opt=thinlto \
 ; RUN:    -shared %t.o %t2.o -o %t4
 ; RUN: llvm-nm %t4 | FileCheck %s --check-prefix=NM
@@ -18,6 +20,7 @@
 
 ; Ensure gold generates an index and not a binary if requested.
 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
+; RUN:    -m elf_x86_64 \
 ; RUN:    --plugin-opt=thinlto \
 ; RUN:    --plugin-opt=thinlto-index-only \
 ; RUN:    -shared %t.o %t2.o -o %t3
@@ -28,6 +31,7 @@
 ; Ensure gold generates an index as well as a binary with save-temps in ThinLTO mode.
 ; First force single-threaded mode
 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
+; RUN:    -m elf_x86_64 \
 ; RUN:    --plugin-opt=save-temps \
 ; RUN:    --plugin-opt=thinlto \
 ; RUN:    --plugin-opt=jobs=1 \
@@ -37,6 +41,7 @@
 
 ; Check with --no-map-whole-files
 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
+; RUN:    -m elf_x86_64 \
 ; RUN:    --plugin-opt=save-temps \
 ; RUN:    --plugin-opt=thinlto \
 ; RUN:    --plugin-opt=jobs=1 \
@@ -47,6 +52,7 @@
 
 ; Next force multi-threaded mode
 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
+; RUN:    -m elf_x86_64 \
 ; RUN:    --plugin-opt=save-temps \
 ; RUN:    --plugin-opt=thinlto \
 ; RUN:    --plugin-opt=jobs=2 \
@@ -56,6 +62,7 @@
 
 ; Test --plugin-opt=obj-path to ensure unique object files generated.
 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
+; RUN:    -m elf_x86_64 \
 ; RUN:    --plugin-opt=thinlto \
 ; RUN:    --plugin-opt=jobs=2 \
 ; RUN:    --plugin-opt=obj-path=%t5.o \
 ; COMBINED-NEXT: </VALUE_SYMTAB
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
 
 declare void @g(...)
 
index 083f89d77402d7caa1dde3591d4349ee3305efb5..617f9f87a917af82858afd2df83d323f039d5fe4 100644 (file)
@@ -4,6 +4,7 @@
 
 ; RUN: rm -f %t1.o.4.opt.bc
 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
+; RUN:    -m elf_x86_64 \
 ; RUN:    --plugin-opt=thinlto \
 ; RUN:    --plugin-opt=save-temps \
 ; RUN:    --plugin-opt=sample-profile=%p/Inputs/afdo.prof \
@@ -12,6 +13,7 @@
 ; RUN: opt -S %t1.o.4.opt.bc | FileCheck %s
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
 
 ; CHECK: ProfileSummary
 declare void @g(...)
index c2ae679dfb03bc7d414c53b3ef096f2a1c503e88..13038b4fb60e53ffc49820439768e18046e8922e 100644 (file)
@@ -9,6 +9,7 @@
 ; Test importing from archive library via gold, using jobs=1 to ensure
 ; output messages are not interleaved.
 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
+; RUN:    -m elf_x86_64 \
 ; RUN:    --plugin-opt=thinlto \
 ; RUN:    --plugin-opt=-print-imports \
 ; RUN:    --plugin-opt=jobs=1 \
@@ -16,6 +17,7 @@
 ; RUN: llvm-nm %t4 | FileCheck %s --check-prefix=NM
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
 
 ; CHECK-DAG: Import g
 declare void @g(...)
index d020336ca7f502fcc0d95bcc6e2ac2bb2d60b443..439abd9c2b944fd71fb23b96ffabea6ec49b6ca2 100644 (file)
@@ -1,11 +1,13 @@
 ; RUN: llvm-as %s -o %t.o
 ; RUN: llvm-as %p/Inputs/type-merge2.ll -o %t2.o
 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
+; RUN:    -m elf_x86_64 \
 ; RUN:    --plugin-opt=save-temps \
 ; RUN:    -shared %t.o %t2.o -o %t3.o
 ; RUN: llvm-dis %t3.o.0.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"
 
 %zed = type { i8 }
 define void @foo()  {
index f63bdbd2c95939f1b8106f0c81ae7a3a8a840f86..1c70ebf5c4670c1be1b80eea7c979c90306fdd76 100644 (file)
@@ -2,6 +2,7 @@
 ; RUN: llvm-as %p/Inputs/visibility.ll -o %t2.o
 
 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
+; RUN:    -m elf_x86_64 \
 ; RUN:    --plugin-opt=save-temps \
 ; RUN:    -shared %t.o %t2.o -o %t.so
 ; RUN: llvm-readobj -t %t.so | FileCheck %s
@@ -19,6 +20,7 @@
 ; IR: define void @foo
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
 
 define weak protected void @foo() {
   ret void