[llvm] r289743 - Use PIC relocation model as default for PowerPC64 ELF.

Joerg Sonnenberger via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 14 16:01:53 PST 2016


Author: joerg
Date: Wed Dec 14 18:01:53 2016
New Revision: 289743

URL: http://llvm.org/viewvc/llvm-project?rev=289743&view=rev
Log:
Use PIC relocation model as default for PowerPC64 ELF.

Most of the PowerPC64 code generation for the ELF ABI is already PIC.
There are four main exceptions:
(1) Constant pointer arrays etc. should in writeable sections.
(2) The TOC restoration NOP after a call is needed for all global
symbols. While GNU ld has a workaround for questionable GCC self-calls,
we trigger the checks for calls from COMDAT sections as they cross input
sections and are therefore not considered self-calls. The current
decision is questionable and suboptimal, but outside the scope of the
change.
(3) TLS access can not use the initial-exec model.
(4) Jump tables should use relative addresses. Note that the current
encoding doesn't work for the large code model, but it is more compact
than the default for any non-trivial jump table. Improving this is again
beyond the scope of this change.

At least (1) and (3) are assumptions made in target-independent code and
introducing additional hooks is a bit messy. Testing with clang shows
that a -fPIC binary is 600KB smaller than the corresponding -fno-pic
build. Separate testing from improved jump table encodings would explain
only about 100KB or so. The rest is expected to be a result of more
aggressive immediate forming for -fno-pic, where the -fPIC binary just
uses TOC entries.

This change brings the LLVM output in line with the GCC output, other
PPC64 compilers like XLC on AIX are known to produce PIC by default
as well. The relocation model can still be provided explicitly, i.e.
when using MCJIT.

One test case for case (1) is included, other test cases with relocation
mode sensitive behavior are wired to static for now. They will be
reviewed and adjusted separately.

Differential Revision: https://reviews.llvm.org/D26566

Added:
    llvm/trunk/test/CodeGen/PowerPC/func-addr-consts.ll
Modified:
    llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp
    llvm/trunk/test/CodeGen/PowerPC/alias.ll
    llvm/trunk/test/CodeGen/PowerPC/cxx_tlscc64.ll
    llvm/trunk/test/CodeGen/PowerPC/fast-isel-br-const.ll
    llvm/trunk/test/CodeGen/PowerPC/fast-isel-load-store.ll
    llvm/trunk/test/CodeGen/PowerPC/func-addr.ll
    llvm/trunk/test/CodeGen/PowerPC/mcm-11.ll
    llvm/trunk/test/CodeGen/PowerPC/mcm-3.ll
    llvm/trunk/test/CodeGen/PowerPC/mcm-obj-2.ll
    llvm/trunk/test/CodeGen/PowerPC/mcm-obj.ll
    llvm/trunk/test/CodeGen/PowerPC/peephole-align.ll
    llvm/trunk/test/CodeGen/PowerPC/ppc64-calls.ll
    llvm/trunk/test/CodeGen/PowerPC/ppc64-nonfunc-calls.ll
    llvm/trunk/test/CodeGen/PowerPC/ppc64-sibcall-shrinkwrap.ll
    llvm/trunk/test/CodeGen/PowerPC/ppc64-sibcall.ll
    llvm/trunk/test/CodeGen/PowerPC/tailcall-string-rvo.ll
    llvm/trunk/test/CodeGen/PowerPC/tailcall1-64.ll
    llvm/trunk/test/CodeGen/PowerPC/tls.ll
    llvm/trunk/test/CodeGen/PowerPC/vsx.ll

Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp?rev=289743&r1=289742&r2=289743&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp Wed Dec 14 18:01:53 2016
@@ -181,6 +181,10 @@ static PPCTargetMachine::PPCABI computeT
 static Reloc::Model getEffectiveRelocModel(const Triple &TT,
                                            Optional<Reloc::Model> RM) {
   if (!RM.hasValue()) {
+    if (TT.getArch() == Triple::ppc64 || TT.getArch() == Triple::ppc64le) {
+      if (!TT.isOSBinFormatMachO() && !TT.isMacOSX())
+        return Reloc::PIC_;
+    }
     if (TT.isOSDarwin())
       return Reloc::DynamicNoPIC;
     return Reloc::Static;

Modified: llvm/trunk/test/CodeGen/PowerPC/alias.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/alias.ll?rev=289743&r1=289742&r2=289743&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/alias.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/alias.ll Wed Dec 14 18:01:53 2016
@@ -1,5 +1,5 @@
-; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -code-model=medium| FileCheck --check-prefix=CHECK --check-prefix=MEDIUM %s
-; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -code-model=large | FileCheck --check-prefix=CHECK --check-prefix=LARGE %s
+; RUN: llc -relocation-model=static -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -code-model=medium| FileCheck --check-prefix=CHECK --check-prefix=MEDIUM %s
+; RUN: llc -relocation-model=static -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -code-model=large | FileCheck --check-prefix=CHECK --check-prefix=LARGE %s
 
 @foo = global i32 42
 @fooa = alias i32, i32* @foo

Modified: llvm/trunk/test/CodeGen/PowerPC/cxx_tlscc64.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/cxx_tlscc64.ll?rev=289743&r1=289742&r2=289743&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/cxx_tlscc64.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/cxx_tlscc64.ll Wed Dec 14 18:01:53 2016
@@ -1,4 +1,4 @@
-; RUN: llc -verify-machineinstrs < %s --enable-shrink-wrap=false -mtriple=powerpc64le-unknown-linux-gnu | FileCheck %s
+; RUN: llc -relocation-model=static -verify-machineinstrs < %s --enable-shrink-wrap=false -mtriple=powerpc64le-unknown-linux-gnu | FileCheck %s
 %struct.S = type { i8 }
 
 @sg = internal thread_local global %struct.S zeroinitializer, align 1

Modified: llvm/trunk/test/CodeGen/PowerPC/fast-isel-br-const.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/fast-isel-br-const.ll?rev=289743&r1=289742&r2=289743&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/fast-isel-br-const.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/fast-isel-br-const.ll Wed Dec 14 18:01:53 2016
@@ -1,4 +1,4 @@
-; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 | FileCheck %s --check-prefix=ELF64
+; RUN: llc -relocation-model=static < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 | FileCheck %s --check-prefix=ELF64
 
 define i32 @t1(i32 %a, i32 %b) nounwind {
 entry:

Modified: llvm/trunk/test/CodeGen/PowerPC/fast-isel-load-store.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/fast-isel-load-store.ll?rev=289743&r1=289742&r2=289743&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/fast-isel-load-store.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/fast-isel-load-store.ll Wed Dec 14 18:01:53 2016
@@ -2,7 +2,7 @@
 ; registers and with -fast-isel-abort=1 turned on the test case will then fail.
 ; When fastisel better supports VSX fix up this test case.
 ;
-; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel -fast-isel-abort=1 -mattr=-vsx -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 | FileCheck %s --check-prefix=ELF64
+; RUN: llc -relocation-model=static < %s -O0 -verify-machineinstrs -fast-isel -fast-isel-abort=1 -mattr=-vsx -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 | FileCheck %s --check-prefix=ELF64
 
 ; This test verifies that load/store instructions are properly generated,
 ; and that they pass MI verification.

Added: llvm/trunk/test/CodeGen/PowerPC/func-addr-consts.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/func-addr-consts.ll?rev=289743&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/func-addr-consts.ll (added)
+++ llvm/trunk/test/CodeGen/PowerPC/func-addr-consts.ll Wed Dec 14 18:01:53 2016
@@ -0,0 +1,16 @@
+; RUN: llc < %s | FileCheck %s
+target datalayout = "E-m:e-i64:64-n32:64"
+target triple = "powerpc64--linux"
+
+ at g = internal constant i8* bitcast (void ()* @f to i8*), section "gsection", align 8
+ at h = constant i8* bitcast (void ()* @f to i8*), section "hsection", align 8
+ at llvm.used = appending global [2 x i8*] [i8* bitcast (i8** @g to i8*), i8* bitcast (i8** @h to i8*)], section "llvm.metadata"
+
+; Function Attrs: nounwind uwtable
+define internal void @f() {
+entry:
+  ret void
+}
+
+; CHECK: .section	gsection,"aw", at progbits
+; CHECK: .section	hsection,"aw", at progbits

Modified: llvm/trunk/test/CodeGen/PowerPC/func-addr.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/func-addr.ll?rev=289743&r1=289742&r2=289743&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/func-addr.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/func-addr.ll Wed Dec 14 18:01:53 2016
@@ -1,5 +1,5 @@
-; RUN: llc -verify-machineinstrs -mtriple powerpc64-linux < %s | FileCheck %s
-; RUN: llc -verify-machineinstrs -O0 -mtriple powerpc64-linux < %s | FileCheck %s
+; RUN: llc -relocation-model=static -verify-machineinstrs -mtriple powerpc64-linux < %s | FileCheck %s
+; RUN: llc -relocation-model=static -verify-machineinstrs -O0 -mtriple powerpc64-linux < %s | FileCheck %s
 
 define void @foo()  {
   ret void

Modified: llvm/trunk/test/CodeGen/PowerPC/mcm-11.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/mcm-11.ll?rev=289743&r1=289742&r2=289743&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/mcm-11.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/mcm-11.ll Wed Dec 14 18:01:53 2016
@@ -1,4 +1,4 @@
-; RUN: llc -verify-machineinstrs -mcpu=pwr7 -O1 -code-model=medium <%s | FileCheck %s
+; RUN: llc -relocation-model=static -verify-machineinstrs -mcpu=pwr7 -O1 -code-model=medium <%s | FileCheck %s
 
 ; Test peephole optimization for medium code model (32-bit TOC offsets)
 ; for loading and storing a file-scope static variable.

Modified: llvm/trunk/test/CodeGen/PowerPC/mcm-3.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/mcm-3.ll?rev=289743&r1=289742&r2=289743&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/mcm-3.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/mcm-3.ll Wed Dec 14 18:01:53 2016
@@ -1,5 +1,5 @@
-; RUN: llc -verify-machineinstrs -mcpu=pwr7 -O0 -code-model=medium <%s | FileCheck -check-prefix=MEDIUM %s
-; RUN: llc -verify-machineinstrs -mcpu=pwr7 -O0 -code-model=large <%s | FileCheck -check-prefix=LARGE %s
+; RUN: llc -relocation-model=static -verify-machineinstrs -mcpu=pwr7 -O0 -code-model=medium <%s | FileCheck -check-prefix=MEDIUM %s
+; RUN: llc -relocation-model=static -verify-machineinstrs -mcpu=pwr7 -O0 -code-model=large <%s | FileCheck -check-prefix=LARGE %s
 
 ; Test correct code generation for medium and large code model
 ; for loading and storing a file-scope static variable.

Modified: llvm/trunk/test/CodeGen/PowerPC/mcm-obj-2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/mcm-obj-2.ll?rev=289743&r1=289742&r2=289743&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/mcm-obj-2.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/mcm-obj-2.ll Wed Dec 14 18:01:53 2016
@@ -1,4 +1,4 @@
-; RUN: llc -verify-machineinstrs -O1 -mcpu=pwr7 -code-model=medium -filetype=obj %s -o - | \
+; RUN: llc -relocation-model=static -verify-machineinstrs -O1 -mcpu=pwr7 -code-model=medium -filetype=obj %s -o - | \
 ; RUN: llvm-readobj -r | FileCheck %s
 
 ; FIXME: When asm-parse is available, could make this an assembly test.

Modified: llvm/trunk/test/CodeGen/PowerPC/mcm-obj.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/mcm-obj.ll?rev=289743&r1=289742&r2=289743&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/mcm-obj.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/mcm-obj.ll Wed Dec 14 18:01:53 2016
@@ -1,12 +1,12 @@
-; RUN: llc -verify-machineinstrs -O0 -mcpu=pwr7 -code-model=medium -filetype=obj -fast-isel=false %s -o - | \
+; RUN: llc -relocation-model=static -verify-machineinstrs -O0 -mcpu=pwr7 -code-model=medium -filetype=obj -fast-isel=false %s -o - | \
 ; RUN: llvm-readobj -r | FileCheck -check-prefix=MEDIUM %s
-; RUN: llc -verify-machineinstrs -O0 -mcpu=pwr7 -code-model=large -filetype=obj -fast-isel=false %s -o - | \
+; RUN: llc -relocation-model=static -verify-machineinstrs -O0 -mcpu=pwr7 -code-model=large -filetype=obj -fast-isel=false %s -o - | \
 ; RUN: llvm-readobj -r | FileCheck -check-prefix=LARGE %s
 
 ; Run jump table test separately since jump tables aren't generated at -O0.
-; RUN: llc -verify-machineinstrs -mcpu=pwr7 -code-model=medium -filetype=obj -fast-isel=false %s -o - | \
+; RUN: llc -relocation-model=static -verify-machineinstrs -mcpu=pwr7 -code-model=medium -filetype=obj -fast-isel=false %s -o - | \
 ; RUN: llvm-readobj -r | FileCheck -check-prefix=MEDIUM-JT %s
-; RUN: llc -verify-machineinstrs -mcpu=pwr7 -code-model=large -filetype=obj -fast-isel=false %s -o - | \
+; RUN: llc -relocation-model=static -verify-machineinstrs -mcpu=pwr7 -code-model=large -filetype=obj -fast-isel=false %s -o - | \
 ; RUN: llvm-readobj -r | FileCheck -check-prefix=LARGE-JT %s
 
 ; FIXME: When asm-parse is available, could make this an assembly test.

Modified: llvm/trunk/test/CodeGen/PowerPC/peephole-align.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/peephole-align.ll?rev=289743&r1=289742&r2=289743&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/peephole-align.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/peephole-align.ll Wed Dec 14 18:01:53 2016
@@ -1,5 +1,5 @@
-; RUN: llc -verify-machineinstrs -mcpu=pwr7 -O1 -code-model=medium <%s | FileCheck %s
-; RUN: llc -verify-machineinstrs -mcpu=pwr8 -O1 -code-model=medium <%s | FileCheck %s
+; RUN: llc -relocation-model=static -verify-machineinstrs -mcpu=pwr7 -O1 -code-model=medium <%s | FileCheck %s
+; RUN: llc -relocation-model=static -verify-machineinstrs -mcpu=pwr8 -O1 -code-model=medium <%s | FileCheck %s
 
 ; Test peephole optimization for medium code model (32-bit TOC offsets)
 ; for loading and storing small offsets within aligned values.

Modified: llvm/trunk/test/CodeGen/PowerPC/ppc64-calls.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/ppc64-calls.ll?rev=289743&r1=289742&r2=289743&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/ppc64-calls.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/ppc64-calls.ll Wed Dec 14 18:01:53 2016
@@ -1,4 +1,4 @@
-; RUN: llc -verify-machineinstrs < %s -march=ppc64 -mcpu=pwr7 | FileCheck %s
+; RUN: llc -relocation-model=static -verify-machineinstrs < %s -march=ppc64 -mcpu=pwr7 | FileCheck %s
 target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v128:128:128-n32:64"
 target triple = "powerpc64-unknown-linux-gnu"
 

Modified: llvm/trunk/test/CodeGen/PowerPC/ppc64-nonfunc-calls.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/ppc64-nonfunc-calls.ll?rev=289743&r1=289742&r2=289743&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/ppc64-nonfunc-calls.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/ppc64-nonfunc-calls.ll Wed Dec 14 18:01:53 2016
@@ -1,4 +1,4 @@
-; RUN: llc -verify-machineinstrs -mcpu=pwr7 < %s | FileCheck %s
+; RUN: llc -relocation-model=static -verify-machineinstrs -mcpu=pwr7 < %s | FileCheck %s
 target datalayout = "E-m:e-i64:64-n32:64"
 target triple = "powerpc64-unknown-linux-gnu"
 

Modified: llvm/trunk/test/CodeGen/PowerPC/ppc64-sibcall-shrinkwrap.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/ppc64-sibcall-shrinkwrap.ll?rev=289743&r1=289742&r2=289743&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/ppc64-sibcall-shrinkwrap.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/ppc64-sibcall-shrinkwrap.ll Wed Dec 14 18:01:53 2016
@@ -1,7 +1,7 @@
-; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -disable-ppc-sco=false --enable-shrink-wrap=false | FileCheck %s -check-prefix=CHECK-SCO-ONLY
-; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -disable-ppc-sco=false --enable-shrink-wrap=true | FileCheck %s -check-prefix=CHECK-SCO-SHRK
-; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-linux-gnu -disable-ppc-sco=false --enable-shrink-wrap=false | FileCheck %s -check-prefix=CHECK-SCO-ONLY
-; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-linux-gnu -disable-ppc-sco=false --enable-shrink-wrap=true | FileCheck %s -check-prefix=CHECK-SCO-SHRK
+; RUN: llc -relocation-model=static -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -disable-ppc-sco=false --enable-shrink-wrap=false | FileCheck %s -check-prefix=CHECK-SCO-ONLY
+; RUN: llc -relocation-model=static -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -disable-ppc-sco=false --enable-shrink-wrap=true | FileCheck %s -check-prefix=CHECK-SCO-SHRK
+; RUN: llc -relocation-model=static -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-linux-gnu -disable-ppc-sco=false --enable-shrink-wrap=false | FileCheck %s -check-prefix=CHECK-SCO-ONLY
+; RUN: llc -relocation-model=static -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-linux-gnu -disable-ppc-sco=false --enable-shrink-wrap=true | FileCheck %s -check-prefix=CHECK-SCO-SHRK
 
 %"class.clang::NamedDecl" = type { i32 }
 declare void @__assert_fail();

Modified: llvm/trunk/test/CodeGen/PowerPC/ppc64-sibcall.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/ppc64-sibcall.ll?rev=289743&r1=289742&r2=289743&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/ppc64-sibcall.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/ppc64-sibcall.ll Wed Dec 14 18:01:53 2016
@@ -1,6 +1,6 @@
-; RUN: llc < %s -O1 -disable-ppc-sco=false -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s -check-prefix=CHECK-SCO
-; RUN: llc < %s -O1 -disable-ppc-sco=false -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr8 | FileCheck %s -check-prefix=CHECK-SCO-HASQPX
-; RUN: llc < %s -O1 -disable-ppc-sco=false -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr8 | FileCheck %s -check-prefix=CHECK-SCO-HASQPX
+; RUN: llc < %s -relocation-model=static -O1 -disable-ppc-sco=false -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s -check-prefix=CHECK-SCO
+; RUN: llc < %s -relocation-model=static -O1 -disable-ppc-sco=false -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr8 | FileCheck %s -check-prefix=CHECK-SCO-HASQPX
+; RUN: llc < %s -relocation-model=static -O1 -disable-ppc-sco=false -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr8 | FileCheck %s -check-prefix=CHECK-SCO-HASQPX
 
 ; No combination of "powerpc64le-unknown-linux-gnu" + "CHECK-SCO", because
 ; only Power8 (and later) fully support LE.

Modified: llvm/trunk/test/CodeGen/PowerPC/tailcall-string-rvo.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/tailcall-string-rvo.ll?rev=289743&r1=289742&r2=289743&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/tailcall-string-rvo.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/tailcall-string-rvo.ll Wed Dec 14 18:01:53 2016
@@ -1,4 +1,4 @@
-; RUN: llc -verify-machineinstrs -O2 < %s | FileCheck %s
+; RUN: llc -relocation-model=static -verify-machineinstrs -O2 < %s | FileCheck %s
 
 ; The call to function TestBar should be a tail call, when in C++ the string
 ; `ret` is RVO returned.

Modified: llvm/trunk/test/CodeGen/PowerPC/tailcall1-64.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/tailcall1-64.ll?rev=289743&r1=289742&r2=289743&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/tailcall1-64.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/tailcall1-64.ll Wed Dec 14 18:01:53 2016
@@ -1,4 +1,4 @@
-; RUN: llc -verify-machineinstrs < %s -march=ppc64 -tailcallopt | grep TC_RETURNd8
+; RUN: llc -relocation-model=static -verify-machineinstrs < %s -march=ppc64 -tailcallopt | grep TC_RETURNd8
 define fastcc i32 @tailcallee(i32 %a1, i32 %a2, i32 %a3, i32 %a4) {
 entry:
 	ret i32 %a3

Modified: llvm/trunk/test/CodeGen/PowerPC/tls.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/tls.ll?rev=289743&r1=289742&r2=289743&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/tls.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/tls.ll Wed Dec 14 18:01:53 2016
@@ -1,5 +1,5 @@
-; RUN: llc -verify-machineinstrs -O0 < %s -march=ppc64 -mcpu=ppc64 | FileCheck -check-prefix=OPT0 %s
-; RUN: llc -verify-machineinstrs -O1 < %s -march=ppc64 -mcpu=ppc64 | FileCheck -check-prefix=OPT1 %s
+; RUN: llc -relocation-model=static -verify-machineinstrs -O0 < %s -march=ppc64 -mcpu=ppc64 | FileCheck -check-prefix=OPT0 %s
+; RUN: llc -relocation-model=static -verify-machineinstrs -O1 < %s -march=ppc64 -mcpu=ppc64 | FileCheck -check-prefix=OPT1 %s
 ; RUN: llc -verify-machineinstrs -O0 < %s -march=ppc32 -mcpu=ppc | FileCheck -check-prefix=OPT0-PPC32 %s
 
 target triple = "powerpc64-unknown-linux-gnu"

Modified: llvm/trunk/test/CodeGen/PowerPC/vsx.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/vsx.ll?rev=289743&r1=289742&r2=289743&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/vsx.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/vsx.ll Wed Dec 14 18:01:53 2016
@@ -1,8 +1,8 @@
-; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mtriple=powerpc64-unknown-linux-gnu -mattr=+vsx < %s | FileCheck %s
-; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mtriple=powerpc64-unknown-linux-gnu -mattr=+vsx < %s | FileCheck -check-prefix=CHECK-REG %s
-; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mtriple=powerpc64-unknown-linux-gnu -mattr=+vsx -fast-isel -O0 < %s | FileCheck %s
-; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mtriple=powerpc64-unknown-linux-gnu -mattr=+vsx -fast-isel -O0 < %s | FileCheck -check-prefix=CHECK-FISL %s
-; RUN: llc -verify-machineinstrs -mcpu=pwr8 -mtriple=powerpc64le-unknown-linux-gnu -mattr=+vsx < %s | FileCheck -check-prefix=CHECK-LE %s
+; RUN: llc -relocation-model=static -verify-machineinstrs -mcpu=pwr7 -mtriple=powerpc64-unknown-linux-gnu -mattr=+vsx < %s | FileCheck %s
+; RUN: llc -relocation-model=static -verify-machineinstrs -mcpu=pwr7 -mtriple=powerpc64-unknown-linux-gnu -mattr=+vsx < %s | FileCheck -check-prefix=CHECK-REG %s
+; RUN: llc -relocation-model=static -verify-machineinstrs -mcpu=pwr7 -mtriple=powerpc64-unknown-linux-gnu -mattr=+vsx -fast-isel -O0 < %s | FileCheck %s
+; RUN: llc -relocation-model=static -verify-machineinstrs -mcpu=pwr7 -mtriple=powerpc64-unknown-linux-gnu -mattr=+vsx -fast-isel -O0 < %s | FileCheck -check-prefix=CHECK-FISL %s
+; RUN: llc -relocation-model=static -verify-machineinstrs -mcpu=pwr8 -mtriple=powerpc64le-unknown-linux-gnu -mattr=+vsx < %s | FileCheck -check-prefix=CHECK-LE %s
 
 define double @test1(double %a, double %b) {
 entry:




More information about the llvm-commits mailing list