[llvm] r347076 - Revert "[PowerPC] Make no-PIC default to match GCC - LLVM"

Stefan Pintilie via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 16 11:24:23 PST 2018


Author: stefanp
Date: Fri Nov 16 11:24:23 2018
New Revision: 347076

URL: http://llvm.org/viewvc/llvm-project?rev=347076&view=rev
Log:
Revert "[PowerPC] Make no-PIC default to match GCC - LLVM"

This reverts commit r347069

Modified:
    llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp
    llvm/trunk/test/CodeGen/PowerPC/MCSE-caller-preserved-reg.ll
    llvm/trunk/test/CodeGen/PowerPC/addegluecrash.ll
    llvm/trunk/test/CodeGen/PowerPC/atomics-constant.ll
    llvm/trunk/test/CodeGen/PowerPC/f128-aggregates.ll
    llvm/trunk/test/CodeGen/PowerPC/f128-conv.ll
    llvm/trunk/test/CodeGen/PowerPC/f128-truncateNconv.ll
    llvm/trunk/test/CodeGen/PowerPC/f128-vecExtractNconv.ll
    llvm/trunk/test/CodeGen/PowerPC/fast-isel-call.ll
    llvm/trunk/test/CodeGen/PowerPC/func-addr-consts.ll
    llvm/trunk/test/CodeGen/PowerPC/mcm-13.ll
    llvm/trunk/test/CodeGen/PowerPC/mcm-6.ll
    llvm/trunk/test/CodeGen/PowerPC/p8-scalar_vector_conversions.ll
    llvm/trunk/test/CodeGen/PowerPC/ppc64-blnop.ll
    llvm/trunk/test/CodeGen/PowerPC/ppc64-i128-abi.ll
    llvm/trunk/test/CodeGen/PowerPC/ppc64le-aggregates.ll
    llvm/trunk/test/CodeGen/PowerPC/ppcf128-endian.ll
    llvm/trunk/test/CodeGen/PowerPC/pr32140.ll
    llvm/trunk/test/CodeGen/PowerPC/preemption.ll
    llvm/trunk/test/CodeGen/PowerPC/save-bp.ll
    llvm/trunk/test/CodeGen/PowerPC/sjlj_no0x.ll
    llvm/trunk/test/CodeGen/PowerPC/swaps-le-6.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesi32gtu.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesi32ltu.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesieqsc.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesieqsi.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesieqsll.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesieqss.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesiequc.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesiequi.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesiequll.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesiequs.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesigesc.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesigesi.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesigesll.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesigess.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesigtsc.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesigtsi.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesigtsll.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesigtss.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesigtuc.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesigtui.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesigtus.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesilesc.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesilesi.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesilesll.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesiless.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesinesc.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesinesi.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesinesll.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesiness.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesineuc.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesineui.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesineull.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesineus.ll
    llvm/trunk/test/CodeGen/PowerPC/testCompareslleqsc.ll
    llvm/trunk/test/CodeGen/PowerPC/testCompareslleqsi.ll
    llvm/trunk/test/CodeGen/PowerPC/testCompareslleqsll.ll
    llvm/trunk/test/CodeGen/PowerPC/testCompareslleqss.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesllequc.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesllequi.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesllequll.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesllequs.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesllgesc.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesllgesi.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesllgesll.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesllgess.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesllgtsll.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesllgtuc.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesllgtui.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesllgtus.ll
    llvm/trunk/test/CodeGen/PowerPC/testCompareslllesc.ll
    llvm/trunk/test/CodeGen/PowerPC/testCompareslllesi.ll
    llvm/trunk/test/CodeGen/PowerPC/testCompareslllesll.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesllless.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesllltui.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesllnesll.ll
    llvm/trunk/test/CodeGen/PowerPC/testComparesllneull.ll
    llvm/trunk/test/CodeGen/PowerPC/toc-float.ll
    llvm/trunk/test/CodeGen/PowerPC/vsx_scalar_ld_st.ll
    llvm/trunk/test/CodeGen/PowerPC/xray-tail-call-sled.ll

Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp Fri Nov 16 11:24:23 2018
@@ -214,7 +214,11 @@ static Reloc::Model getEffectiveRelocMod
   if (TT.isOSDarwin())
     return Reloc::DynamicNoPIC;
 
-  // Otherwise is static by default.
+  // Non-darwin 64-bit platforms are PIC by default.
+  if (TT.getArch() == Triple::ppc64 || TT.getArch() == Triple::ppc64le)
+    return Reloc::PIC_;
+
+  // 32-bit is static by default.
   return Reloc::Static;
 }
 

Modified: llvm/trunk/test/CodeGen/PowerPC/MCSE-caller-preserved-reg.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/MCSE-caller-preserved-reg.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/MCSE-caller-preserved-reg.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/MCSE-caller-preserved-reg.ll Fri Nov 16 11:24:23 2018
@@ -1,4 +1,4 @@
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s
 ; The instructions addis,addi, bl are used to calculate the address of TLS
 ; thread local variables. These TLS access code sequences are generated
 ; repeatedly every time the thread local variable is accessed. By communicating

Modified: llvm/trunk/test/CodeGen/PowerPC/addegluecrash.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/addegluecrash.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/addegluecrash.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/addegluecrash.ll Fri Nov 16 11:24:23 2018
@@ -27,7 +27,6 @@ define void @bn_mul_comba8(i64* nocaptur
 ; CHECK-NEXT:    mr 4, 10
 ; CHECK-NEXT:    clrldi 4, 4, 32
 ; CHECK-NEXT:    std 4, 0(3)
-; CHECK-NEXT:    std 6, -8(1) # 8-byte Folded Spill
 ; CHECK-NEXT:    blr
   %1 = load i64, i64* %a, align 8
   %conv = zext i64 %1 to i128

Modified: llvm/trunk/test/CodeGen/PowerPC/atomics-constant.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/atomics-constant.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/atomics-constant.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/atomics-constant.ll Fri Nov 16 11:24:23 2018
@@ -8,14 +8,14 @@ target triple = "powerpc64le-unknown-lin
 define i64 @foo() {
 ; CHECK-LABEL: foo:
 ; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    addis 3, 2, a at toc@ha
+; CHECK-NEXT:    addis 3, 2, .LC0 at toc@ha
 ; CHECK-NEXT:    li 4, 0
-; CHECK-NEXT:    addi 3, 3, a at toc@l
+; CHECK-NEXT:    ld 3, .LC0 at toc@l(3)
 ; CHECK-NEXT:    cmpd 7, 4, 4
 ; CHECK-NEXT:    ld 3, 0(3)
-; CHECK-NEXT:    li 3, 0
 ; CHECK-NEXT:    bne- 7, .+4
 ; CHECK-NEXT:    isync
+; CHECK-NEXT:    li 3, 0
 ; CHECK-NEXT:    blr
 entry:
   %value = load atomic i64, i64* @a acquire, align 8

Modified: llvm/trunk/test/CodeGen/PowerPC/f128-aggregates.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/f128-aggregates.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/f128-aggregates.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/f128-aggregates.ll Fri Nov 16 11:24:23 2018
@@ -1,7 +1,7 @@
-; RUN: llc -relocation-model=pic -mcpu=pwr9 -mtriple=powerpc64le-unknown-unknown \
+; RUN: llc -mcpu=pwr9 -mtriple=powerpc64le-unknown-unknown \
 ; RUN:   -enable-ppc-quad-precision -verify-machineinstrs \
 ; RUN:   -ppc-vsr-nums-as-vr -ppc-asm-full-reg-names < %s | FileCheck %s
-; RUN: llc -relocation-model=pic -mcpu=pwr9 -mtriple=powerpc64-unknown-unknown \
+; RUN: llc -mcpu=pwr9 -mtriple=powerpc64-unknown-unknown \
 ; RUN:   -enable-ppc-quad-precision -verify-machineinstrs \
 ; RUN:   -ppc-vsr-nums-as-vr -ppc-asm-full-reg-names < %s \
 ; RUN:   | FileCheck -check-prefix=CHECK-BE %s

Modified: llvm/trunk/test/CodeGen/PowerPC/f128-conv.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/f128-conv.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/f128-conv.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/f128-conv.ll Fri Nov 16 11:24:23 2018
@@ -1,4 +1,4 @@
-; RUN: llc -relocation-model=pic -mcpu=pwr9 -mtriple=powerpc64le-unknown-unknown \
+; RUN: llc -mcpu=pwr9 -mtriple=powerpc64le-unknown-unknown \
 ; RUN:   -enable-ppc-quad-precision -ppc-vsr-nums-as-vr \
 ; RUN:   -verify-machineinstrs -ppc-asm-full-reg-names < %s | FileCheck %s
 

Modified: llvm/trunk/test/CodeGen/PowerPC/f128-truncateNconv.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/f128-truncateNconv.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/f128-truncateNconv.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/f128-truncateNconv.ll Fri Nov 16 11:24:23 2018
@@ -1,4 +1,4 @@
-; RUN: llc -relocation-model=pic -mcpu=pwr9 -mtriple=powerpc64le-unknown-unknown \
+; RUN: llc -mcpu=pwr9 -mtriple=powerpc64le-unknown-unknown \
 ; RUN:   -verify-machineinstrs -enable-ppc-quad-precision \
 ; RUN:   -ppc-vsr-nums-as-vr -ppc-asm-full-reg-names < %s | FileCheck %s
 

Modified: llvm/trunk/test/CodeGen/PowerPC/f128-vecExtractNconv.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/f128-vecExtractNconv.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/f128-vecExtractNconv.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/f128-vecExtractNconv.ll Fri Nov 16 11:24:23 2018
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
 ; RUN: llc -mcpu=pwr9 -mtriple=powerpc64le-unknown-unknown -ppc-vsr-nums-as-vr \
-; RUN:   -relocation-model=pic -ppc-asm-full-reg-names -verify-machineinstrs \
+; RUN:   -ppc-asm-full-reg-names -verify-machineinstrs \
 ; RUN:   -enable-ppc-quad-precision < %s | FileCheck %s
 ; RUN: llc -mcpu=pwr9 -mtriple=powerpc64-unknown-unknown -ppc-vsr-nums-as-vr \
 ; RUN:   -ppc-asm-full-reg-names -verify-machineinstrs \

Modified: llvm/trunk/test/CodeGen/PowerPC/fast-isel-call.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/fast-isel-call.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/fast-isel-call.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/fast-isel-call.ll Fri Nov 16 11:24:23 2018
@@ -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 -relocation-model=pic -verify-machineinstrs -mattr=-vsx -fast-isel-abort=1 -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 -ppc-late-peephole=true | FileCheck %s --check-prefix=ELF64
+; RUN: llc < %s -O0 -verify-machineinstrs -mattr=-vsx -fast-isel-abort=1 -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 -ppc-late-peephole=true | FileCheck %s --check-prefix=ELF64
 
 define i32 @t1(i8 signext %a) nounwind {
   %1 = sext i8 %a to i32

Modified: 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=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/func-addr-consts.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/func-addr-consts.ll Fri Nov 16 11:24:23 2018
@@ -12,5 +12,5 @@ entry:
   ret void
 }
 
-; CHECK: .section	gsection,"a", at progbits
-; CHECK: .section	hsection,"a", at progbits
+; CHECK: .section	gsection,"aw", at progbits
+; CHECK: .section	hsection,"aw", at progbits

Modified: llvm/trunk/test/CodeGen/PowerPC/mcm-13.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/mcm-13.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/mcm-13.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/mcm-13.ll Fri Nov 16 11:24:23 2018
@@ -1,5 +1,5 @@
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mcpu=pwr7 -O0 -code-model=medium <%s | FileCheck %s
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mcpu=pwr7 -O0 -code-model=large <%s | FileCheck %s
+; RUN: llc -verify-machineinstrs -mcpu=pwr7 -O0 -code-model=medium <%s | FileCheck %s
+; RUN: llc -verify-machineinstrs -mcpu=pwr7 -O0 -code-model=large <%s | FileCheck %s
 
 ; Test correct code generation for medium and large code model
 ; for loading and storing a weak variable

Modified: llvm/trunk/test/CodeGen/PowerPC/mcm-6.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/mcm-6.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/mcm-6.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/mcm-6.ll Fri Nov 16 11:24:23 2018
@@ -1,5 +1,5 @@
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mcpu=pwr7 -O0 -code-model=medium < %s | FileCheck %s
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mcpu=pwr7 -O0 -code-model=large < %s | FileCheck %s
+; RUN: llc -verify-machineinstrs -mcpu=pwr7 -O0 -code-model=medium < %s | FileCheck %s
+; RUN: llc -verify-machineinstrs -mcpu=pwr7 -O0 -code-model=large < %s | FileCheck %s
 
 ; Test correct code generation for medium and large code model
 ; for loading and storing a tentatively defined variable.

Modified: llvm/trunk/test/CodeGen/PowerPC/p8-scalar_vector_conversions.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/p8-scalar_vector_conversions.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/p8-scalar_vector_conversions.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/p8-scalar_vector_conversions.ll Fri Nov 16 11:24:23 2018
@@ -1,8 +1,8 @@
 ; RUN: llc < %s -ppc-vsr-nums-as-vr -mtriple=powerpc64-unknown-linux-gnu \
-; RUN:       -verify-machineinstrs -ppc-asm-full-reg-names -mcpu=pwr8 -relocation-model=pic \
+; RUN:       -verify-machineinstrs -ppc-asm-full-reg-names -mcpu=pwr8 \
 ; RUN:       | FileCheck %s
 ; RUN: llc < %s -ppc-vsr-nums-as-vr -mtriple=powerpc64le-unknown-linux-gnu \
-; RUN:       -verify-machineinstrs -ppc-asm-full-reg-names -mcpu=pwr8 -relocation-model=pic \
+; RUN:       -verify-machineinstrs -ppc-asm-full-reg-names -mcpu=pwr8 \
 ; RUN:       | FileCheck %s -check-prefix=CHECK-LE
 
 ; The build[csilf] functions simply test the scalar_to_vector handling with

Modified: llvm/trunk/test/CodeGen/PowerPC/ppc64-blnop.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/ppc64-blnop.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/ppc64-blnop.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/ppc64-blnop.ll Fri Nov 16 11:24:23 2018
@@ -1,11 +1,11 @@
+; RUN: llc < %s -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s
+; RUN: llc < %s -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr8 | FileCheck %s
+; RUN: llc < %s -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr8 | FileCheck %s
 ; RUN: llc < %s -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s
-; RUN: llc < %s -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr8 | FileCheck %s
-; RUN: llc < %s -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr8 | FileCheck %s
-; RUN: llc < %s -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s
-; RUN: llc < %s -relocation-model=pic -function-sections -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s -check-prefix=CHECK-FS
+; RUN: llc < %s -function-sections -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s -check-prefix=CHECK-FS
 ; RUN: llc < %s -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu | FileCheck %s
-; RUN: llc < %s -relocation-model=pic -function-sections -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu | FileCheck %s -check-prefix=CHECK-FS
-; RUN: llc < %s -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: llc < %s -function-sections -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu | FileCheck %s -check-prefix=CHECK-FS
+; RUN: llc < %s -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
 ; RUN: -code-model=small -mcpu=pwr8 | FileCheck %s -check-prefix=SCM
 
 %class.T = type { [2 x i8] }

Modified: llvm/trunk/test/CodeGen/PowerPC/ppc64-i128-abi.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/ppc64-i128-abi.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/ppc64-i128-abi.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/ppc64-i128-abi.ll Fri Nov 16 11:24:23 2018
@@ -1,33 +1,33 @@
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
 ; RUN:   -mcpu=pwr8 < %s | FileCheck %s -check-prefix=CHECK-LE \
 ; RUN:   --implicit-check-not xxswapd
 
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
 ; RUN:   -mcpu=pwr8 < %s | FileCheck %s -check-prefix=CHECK-BE
 
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
 ; RUN:   -mcpu=pwr8 -mattr=-vsx < %s | FileCheck %s -check-prefix=CHECK-NOVSX
 
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
 ; RUN:   -mcpu=pwr8 -mattr=-vsx < %s | FileCheck %s -check-prefix=CHECK-NOVSX \
 ; RUN:   --implicit-check-not xxswapd
 
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
 ; RUN:   -mcpu=pwr8 -mattr=-vsx < %s | FileCheck %s -check-prefix=CHECK-BE-NOVSX
 
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
 ; RUN:   -mcpu=pwr8 -mattr=-vsx < %s | \
 ; RUN:   FileCheck %s -check-prefix=CHECK-LE-NOVSX --implicit-check-not xxswapd
 
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
 ; RUN:   -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr < %s | \
 ; RUN:   FileCheck %s -check-prefix=CHECK-P9 --implicit-check-not xxswapd
 
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
 ; RUN:   -mcpu=pwr9 -mattr=-vsx < %s | FileCheck %s -check-prefix=CHECK-NOVSX \
 ; RUN:   --implicit-check-not xxswapd
 
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
 ; RUN:   -mcpu=pwr9 -mattr=-power9-vector -mattr=-direct-move < %s | \
 ; RUN:   FileCheck %s -check-prefix=CHECK-LE --implicit-check-not xxswapd
 

Modified: llvm/trunk/test/CodeGen/PowerPC/ppc64le-aggregates.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/ppc64le-aggregates.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/ppc64le-aggregates.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/ppc64le-aggregates.ll Fri Nov 16 11:24:23 2018
@@ -1,8 +1,8 @@
-; RUN: llc -relocation-model=pic -verify-machineinstrs < %s -mcpu=pwr8 \
+; RUN: llc -verify-machineinstrs < %s -mcpu=pwr8 \
 ; RUN:   -mattr=+altivec -mattr=-vsx | FileCheck %s
-; RUN: llc -relocation-model=pic -verify-machineinstrs < %s -mattr=+altivec \
+; RUN: llc -verify-machineinstrs < %s -mattr=+altivec \
 ; RUN:   -mattr=-vsx | FileCheck %s
-; RUN: llc -relocation-model=pic -verify-machineinstrs < %s -mcpu=pwr9 \
+; RUN: llc -verify-machineinstrs < %s -mcpu=pwr9 \
 ; RUN:   -mattr=-direct-move -mattr=+altivec | FileCheck %s
 
 ; Currently VSX support is disabled for this test because we generate lxsdx

Modified: llvm/trunk/test/CodeGen/PowerPC/ppcf128-endian.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/ppcf128-endian.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/ppcf128-endian.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/ppcf128-endian.ll Fri Nov 16 11:24:23 2018
@@ -1,4 +1,4 @@
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mcpu=pwr7 -mattr=+altivec -mattr=-vsx < %s | FileCheck %s
+; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mattr=+altivec -mattr=-vsx < %s | FileCheck %s
 
 target datalayout = "e-m:e-i64:64-n32:64"
 target triple = "powerpc64le-unknown-linux-gnu"

Modified: llvm/trunk/test/CodeGen/PowerPC/pr32140.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/pr32140.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/pr32140.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/pr32140.ll Fri Nov 16 11:24:23 2018
@@ -10,10 +10,7 @@
 define void @bswapStorei64Toi32() {
 ; CHECK-LABEL: bswapStorei64Toi32:
 ; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    addis 3, 2, ai at toc@ha
-; CHECK-NEXT:    addis 4, 2, bi at toc@ha
-; CHECK-NEXT:    lwa 3, ai at toc@l(3)
-; CHECK-NEXT:    addi 4, 4, bi at toc@l
+; CHECK:         lwa 3, 0(3)
 ; CHECK-NEXT:    rldicl 3, 3, 32, 32
 ; CHECK-NEXT:    stwbrx 3, 0, 4
 ; CHECK-NEXT:    blr
@@ -29,10 +26,7 @@ entry:
 define void @bswapStorei32Toi16() {
 ; CHECK-LABEL: bswapStorei32Toi16:
 ; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    addis 3, 2, as at toc@ha
-; CHECK-NEXT:    addis 4, 2, bs at toc@ha
-; CHECK-NEXT:    lha 3, as at toc@l(3)
-; CHECK-NEXT:    addi 4, 4, bs at toc@l
+; CHECK:         lha 3, 0(3)
 ; CHECK-NEXT:    srwi 3, 3, 16
 ; CHECK-NEXT:    sthbrx 3, 0, 4
 ; CHECK-NEXT:    blr
@@ -48,10 +42,7 @@ entry:
 define void @bswapStorei64Toi16() {
 ; CHECK-LABEL: bswapStorei64Toi16:
 ; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    addis 3, 2, as at toc@ha
-; CHECK-NEXT:    addis 4, 2, bs at toc@ha
-; CHECK-NEXT:    lha 3, as at toc@l(3)
-; CHECK-NEXT:    addi 4, 4, bs at toc@l
+; CHECK:         lha 3, 0(3)
 ; CHECK-NEXT:    rldicl 3, 3, 16, 48
 ; CHECK-NEXT:    sthbrx 3, 0, 4
 ; CHECK-NEXT:    blr

Modified: llvm/trunk/test/CodeGen/PowerPC/preemption.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/preemption.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/preemption.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/preemption.ll Fri Nov 16 11:24:23 2018
@@ -1,5 +1,4 @@
-; RUN: llc -mtriple powerpc64le-unkown-gnu-linux  -relocation-model=pic \
-; RUN: < %s |  FileCheck %s
+; RUN: llc -mtriple powerpc64le-unkown-gnu-linux  < %s |  FileCheck %s
 ; RUN: llc -mtriple powerpc64le-unkown-gnu-linux -relocation-model=static \
 ; RUN: < %s |  FileCheck --check-prefix=STATIC %s
 ; RUN: llc -mtriple powerpc64le-unkown-gnu-linux -relocation-model=pic \

Modified: llvm/trunk/test/CodeGen/PowerPC/save-bp.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/save-bp.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/save-bp.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/save-bp.ll Fri Nov 16 11:24:23 2018
@@ -1,6 +1,6 @@
 ; RUN: llc -mtriple=ppc64-- -ppc-always-use-base-pointer < %s | FileCheck %s --check-prefix CHECK --check-prefix PPC64
-; RUN: llc -ppc-always-use-base-pointer -relocation-model=static < %s | FileCheck %s --check-prefix CHECK --check-prefix PPC32
-; RUN: llc -ppc-always-use-base-pointer -relocation-model=pic < %s | FileCheck %s --check-prefix CHECK --check-prefix PPC32PIC
+; RUN: llc -ppc-always-use-base-pointer < %s | FileCheck %s --check-prefix CHECK --check-prefix PPC32
+; RUN: llc -ppc-always-use-base-pointer -relocation-model pic < %s | FileCheck %s --check-prefix CHECK --check-prefix PPC32PIC
 
 ; CHECK-LABEL: fred:
 

Modified: llvm/trunk/test/CodeGen/PowerPC/sjlj_no0x.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/sjlj_no0x.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/sjlj_no0x.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/sjlj_no0x.ll Fri Nov 16 11:24:23 2018
@@ -1,6 +1,6 @@
-; RUN: llc < %s -relocation-model=pic -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 -verify-machineinstrs | FileCheck %s
-; RUN: llc < %s -relocation-model=pic -mtriple=powerpc64-unknown-linux-gnu -mcpu=a2 -verify-machineinstrs | FileCheck %s
-; RUN: llc < %s -relocation-model=pic -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr8 -verify-machineinstrs | FileCheck %s
+; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 -verify-machineinstrs | FileCheck %s
+; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -mcpu=a2 -verify-machineinstrs | FileCheck %s
+; RUN: llc < %s -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr8 -verify-machineinstrs | FileCheck %s
 
 target datalayout = "e-m:e-i64:64-n32:64"
 target triple = "powerpc64le-unknown-linux-gnu"

Modified: llvm/trunk/test/CodeGen/PowerPC/swaps-le-6.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/swaps-le-6.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/swaps-le-6.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/swaps-le-6.ll Fri Nov 16 11:24:23 2018
@@ -1,13 +1,13 @@
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mcpu=pwr8 -ppc-vsr-nums-as-vr \
+; RUN: llc -verify-machineinstrs -mcpu=pwr8 -ppc-vsr-nums-as-vr \
 ; RUN:   -ppc-asm-full-reg-names -mtriple=powerpc64le-unknown-linux-gnu \
 ; RUN:   -O3 < %s | FileCheck %s
 
-; RUN: llc -relocation-model=pic -mcpu=pwr9 -mtriple=powerpc64le-unknown-linux-gnu -O3 \
+; RUN: llc -mcpu=pwr9 -mtriple=powerpc64le-unknown-linux-gnu -O3 \
 ; RUN:   -ppc-vsr-nums-as-vr -ppc-asm-full-reg-names -verify-machineinstrs \
 ; RUN:   < %s | FileCheck %s --check-prefix=CHECK-P9 \
 ; RUN:   --implicit-check-not xxswapd
 
-; RUN: llc -relocation-model=pic -mcpu=pwr9 -mtriple=powerpc64le-unknown-linux-gnu -O3 \
+; RUN: llc -mcpu=pwr9 -mtriple=powerpc64le-unknown-linux-gnu -O3 \
 ; RUN:   -ppc-vsr-nums-as-vr -ppc-asm-full-reg-names -verify-machineinstrs \
 ; RUN:   -mattr=-power9-vector < %s | FileCheck %s
 

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesi32gtu.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesi32gtu.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesi32gtu.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesi32gtu.ll Fri Nov 16 11:24:23 2018
@@ -1,7 +1,7 @@
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
 

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesi32ltu.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesi32ltu.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesi32ltu.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesi32ltu.ll Fri Nov 16 11:24:23 2018
@@ -1,7 +1,7 @@
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
 

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesieqsc.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesieqsc.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesieqsc.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesieqsc.ll Fri Nov 16 11:24:23 2018
@@ -69,11 +69,12 @@ entry:
 define void @test_ieqsc_store(i8 signext %a, i8 signext %b) {
 ; CHECK-LABEL: test_ieqsc_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    cntlzw r3, r3
 ; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    stb r3, glob at toc@l(r5)
+; CHECK-NEXT:    stb r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i8 %a, %b
@@ -86,12 +87,13 @@ entry:
 define void @test_ieqsc_sext_store(i8 signext %a, i8 signext %b) {
 ; CHECK-LABEL: test_ieqsc_sext_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    stb r3, glob at toc@l(r5)
+; CHECK-NEXT:    stb r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i8 %a, %b
@@ -104,10 +106,11 @@ entry:
 define void @test_ieqsc_z_store(i8 signext %a) {
 ; CHECK-LABEL: test_ieqsc_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    stb r3, glob at toc@l(r4)
+; CHECK-NEXT:    stb r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i8 %a, 0
@@ -120,11 +123,12 @@ entry:
 define void @test_ieqsc_sext_z_store(i8 signext %a) {
 ; CHECK-LABEL: test_ieqsc_sext_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    stb r3, glob at toc@l(r4)
+; CHECK-NEXT:    stb r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i8 %a, 0

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesieqsi.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesieqsi.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesieqsi.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesieqsi.ll Fri Nov 16 11:24:23 2018
@@ -69,11 +69,12 @@ entry:
 define void @test_ieqsi_store(i32 signext %a, i32 signext %b) {
 ; CHECK-LABEL: test_ieqsi_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    cntlzw r3, r3
 ; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    stw r3, glob at toc@l(r5)
+; CHECK-NEXT:    stw r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i32 %a, %b
@@ -86,12 +87,13 @@ entry:
 define void @test_ieqsi_sext_store(i32 signext %a, i32 signext %b) {
 ; CHECK-LABEL: test_ieqsi_sext_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    stw r3, glob at toc@l(r5)
+; CHECK-NEXT:    stw r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i32 %a, %b
@@ -104,10 +106,11 @@ entry:
 define void @test_ieqsi_z_store(i32 signext %a) {
 ; CHECK-LABEL: test_ieqsi_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    stw r3, glob at toc@l(r4)
+; CHECK-NEXT:    stw r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i32 %a, 0
@@ -120,11 +123,12 @@ entry:
 define void @test_ieqsi_sext_z_store(i32 signext %a) {
 ; CHECK-LABEL: test_ieqsi_sext_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    stw r3, glob at toc@l(r4)
+; CHECK-NEXT:    stw r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i32 %a, 0

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesieqsll.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesieqsll.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesieqsll.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesieqsll.ll Fri Nov 16 11:24:23 2018
@@ -67,11 +67,12 @@ entry:
 define void @test_ieqsll_store(i64 %a, i64 %b) {
 ; CHECK-LABEL: test_ieqsll_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    cntlzd r3, r3
 ; CHECK-NEXT:    rldicl r3, r3, 58, 63
-; CHECK-NEXT:    std r3, glob at toc@l(r5)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i64 %a, %b
@@ -84,11 +85,12 @@ entry:
 define void @test_ieqsll_sext_store(i64 %a, i64 %b) {
 ; CHECK-LABEL: test_ieqsll_sext_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    addic r3, r3, -1
 ; CHECK-NEXT:    subfe r3, r3, r3
-; CHECK-NEXT:    std r3, glob at toc@l(r5)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i64 %a, %b
@@ -101,10 +103,11 @@ entry:
 define void @test_ieqsll_z_store(i64 %a) {
 ; CHECK-LABEL: test_ieqsll_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    cntlzd r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    rldicl r3, r3, 58, 63
-; CHECK-NEXT:    std r3, glob at toc@l(r4)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i64 %a, 0
@@ -117,10 +120,11 @@ entry:
 define void @test_ieqsll_sext_z_store(i64 %a) {
 ; CHECK-LABEL: test_ieqsll_sext_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    addic r3, r3, -1
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    subfe r3, r3, r3
-; CHECK-NEXT:    std r3, glob at toc@l(r4)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i64 %a, 0

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesieqss.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesieqss.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesieqss.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesieqss.ll Fri Nov 16 11:24:23 2018
@@ -69,11 +69,12 @@ entry:
 define void @test_ieqss_store(i16 signext %a, i16 signext %b) {
 ; CHECK-LABEL: test_ieqss_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    cntlzw r3, r3
 ; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    sth r3, glob at toc@l(r5)
+; CHECK-NEXT:    sth r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i16 %a, %b
@@ -86,12 +87,13 @@ entry:
 define void @test_ieqss_sext_store(i16 signext %a, i16 signext %b) {
 ; CHECK-LABEL: test_ieqss_sext_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    sth r3, glob at toc@l(r5)
+; CHECK-NEXT:    sth r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i16 %a, %b
@@ -104,10 +106,11 @@ entry:
 define void @test_ieqss_z_store(i16 signext %a) {
 ; CHECK-LABEL: test_ieqss_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    sth r3, glob at toc@l(r4)
+; CHECK-NEXT:    sth r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i16 %a, 0
@@ -120,11 +123,12 @@ entry:
 define void @test_ieqss_sext_z_store(i16 signext %a) {
 ; CHECK-LABEL: test_ieqss_sext_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    sth r3, glob at toc@l(r4)
+; CHECK-NEXT:    sth r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i16 %a, 0

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesiequc.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesiequc.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesiequc.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesiequc.ll Fri Nov 16 11:24:23 2018
@@ -69,11 +69,12 @@ entry:
 define void @test_iequc_store(i8 zeroext %a, i8 zeroext %b) {
 ; CHECK-LABEL: test_iequc_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    cntlzw r3, r3
 ; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    stb r3, glob at toc@l(r5)
+; CHECK-NEXT:    stb r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i8 %a, %b
@@ -86,12 +87,13 @@ entry:
 define void @test_iequc_sext_store(i8 zeroext %a, i8 zeroext %b) {
 ; CHECK-LABEL: test_iequc_sext_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    stb r3, glob at toc@l(r5)
+; CHECK-NEXT:    stb r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i8 %a, %b
@@ -104,10 +106,11 @@ entry:
 define void @test_iequc_z_store(i8 zeroext %a) {
 ; CHECK-LABEL: test_iequc_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    stb r3, glob at toc@l(r4)
+; CHECK-NEXT:    stb r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i8 %a, 0
@@ -120,11 +123,12 @@ entry:
 define void @test_iequc_sext_z_store(i8 zeroext %a) {
 ; CHECK-LABEL: test_iequc_sext_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    stb r3, glob at toc@l(r4)
+; CHECK-NEXT:    stb r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i8 %a, 0

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesiequi.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesiequi.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesiequi.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesiequi.ll Fri Nov 16 11:24:23 2018
@@ -69,11 +69,12 @@ entry:
 define void @test_iequi_store(i32 zeroext %a, i32 zeroext %b) {
 ; CHECK-LABEL: test_iequi_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    cntlzw r3, r3
 ; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    stw r3, glob at toc@l(r5)
+; CHECK-NEXT:    stw r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i32 %a, %b
@@ -86,12 +87,13 @@ entry:
 define void @test_iequi_sext_store(i32 zeroext %a, i32 zeroext %b) {
 ; CHECK-LABEL: test_iequi_sext_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    stw r3, glob at toc@l(r5)
+; CHECK-NEXT:    stw r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i32 %a, %b
@@ -104,10 +106,11 @@ entry:
 define void @test_iequi_z_store(i32 zeroext %a) {
 ; CHECK-LABEL: test_iequi_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    stw r3, glob at toc@l(r4)
+; CHECK-NEXT:    stw r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i32 %a, 0
@@ -120,11 +123,12 @@ entry:
 define void @test_iequi_sext_z_store(i32 zeroext %a) {
 ; CHECK-LABEL: test_iequi_sext_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    stw r3, glob at toc@l(r4)
+; CHECK-NEXT:    stw r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i32 %a, 0

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesiequll.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesiequll.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesiequll.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesiequll.ll Fri Nov 16 11:24:23 2018
@@ -67,11 +67,12 @@ entry:
 define void @test_iequll_store(i64 %a, i64 %b) {
 ; CHECK-LABEL: test_iequll_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    cntlzd r3, r3
 ; CHECK-NEXT:    rldicl r3, r3, 58, 63
-; CHECK-NEXT:    std r3, glob at toc@l(r5)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i64 %a, %b
@@ -84,11 +85,12 @@ entry:
 define void @test_iequll_sext_store(i64 %a, i64 %b) {
 ; CHECK-LABEL: test_iequll_sext_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    addic r3, r3, -1
 ; CHECK-NEXT:    subfe r3, r3, r3
-; CHECK-NEXT:    std r3, glob at toc@l(r5)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i64 %a, %b
@@ -101,10 +103,11 @@ entry:
 define void @test_iequll_z_store(i64 %a) {
 ; CHECK-LABEL: test_iequll_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    cntlzd r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    rldicl r3, r3, 58, 63
-; CHECK-NEXT:    std r3, glob at toc@l(r4)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i64 %a, 0
@@ -117,10 +120,11 @@ entry:
 define void @test_iequll_sext_z_store(i64 %a) {
 ; CHECK-LABEL: test_iequll_sext_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    addic r3, r3, -1
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    subfe r3, r3, r3
-; CHECK-NEXT:    std r3, glob at toc@l(r4)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i64 %a, 0

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesiequs.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesiequs.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesiequs.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesiequs.ll Fri Nov 16 11:24:23 2018
@@ -69,11 +69,12 @@ entry:
 define void @test_iequs_store(i16 zeroext %a, i16 zeroext %b) {
 ; CHECK-LABEL: test_iequs_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    cntlzw r3, r3
 ; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    sth r3, glob at toc@l(r5)
+; CHECK-NEXT:    sth r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i16 %a, %b
@@ -86,12 +87,13 @@ entry:
 define void @test_iequs_sext_store(i16 zeroext %a, i16 zeroext %b) {
 ; CHECK-LABEL: test_iequs_sext_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    sth r3, glob at toc@l(r5)
+; CHECK-NEXT:    sth r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i16 %a, %b
@@ -104,10 +106,11 @@ entry:
 define void @test_iequs_z_store(i16 zeroext %a) {
 ; CHECK-LABEL: test_iequs_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    sth r3, glob at toc@l(r4)
+; CHECK-NEXT:    sth r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i16 %a, 0
@@ -120,11 +123,12 @@ entry:
 define void @test_iequs_sext_z_store(i16 zeroext %a) {
 ; CHECK-LABEL: test_iequs_sext_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    sth r3, glob at toc@l(r4)
+; CHECK-NEXT:    sth r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i16 %a, 0

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesigesc.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesigesc.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesigesc.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesigesc.ll Fri Nov 16 11:24:23 2018
@@ -36,11 +36,12 @@ entry:
 define void @test_igesc_store(i8 signext %a, i8 signext %b) {
 ; CHECK-LABEL: test_igesc_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    sub r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    rldicl r3, r3, 1, 63
 ; CHECK-NEXT:    xori r3, r3, 1
-; CHECK-NEXT:    stb r3, glob at toc@l(r5)
+; CHECK-NEXT:    stb r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sge i8 %a, %b
@@ -52,11 +53,12 @@ entry:
 define void @test_igesc_sext_store(i8 signext %a, i8 signext %b) {
 ; CHECK-LABEL: test_igesc_sext_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    sub r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    rldicl r3, r3, 1, 63
 ; CHECK-NEXT:    addi r3, r3, -1
-; CHECK-NEXT:    stb r3, glob at toc@l(r5)
+; CHECK-NEXT:    stb r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sge i8 %a, %b

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesigesi.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesigesi.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesigesi.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesigesi.ll Fri Nov 16 11:24:23 2018
@@ -36,11 +36,12 @@ entry:
 define void @test_igesi_store(i32 signext %a, i32 signext %b) {
 ; CHECK-LABEL: test_igesi_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    sub r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    rldicl r3, r3, 1, 63
 ; CHECK-NEXT:    xori r3, r3, 1
-; CHECK-NEXT:    stw r3, glob at toc@l(r5)
+; CHECK-NEXT:    stw r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sge i32 %a, %b
@@ -52,11 +53,12 @@ entry:
 define void @test_igesi_sext_store(i32 signext %a, i32 signext %b) {
 ; CHECK-LABEL: test_igesi_sext_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    sub r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    rldicl r3, r3, 1, 63
 ; CHECK-NEXT:    addi r3, r3, -1
-; CHECK-NEXT:    stw r3, glob at toc@l(r5)
+; CHECK-NEXT:    stw r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sge i32 %a, %b

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesigesll.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesigesll.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesigesll.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesigesll.ll Fri Nov 16 11:24:23 2018
@@ -1,10 +1,10 @@
-; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
 @glob = common local_unnamed_addr global i64 0, align 8
 
 define signext i32 @test_igesll(i64 %a, i64 %b) {
@@ -63,12 +63,11 @@ entry:
 define void @test_igesll_store(i64 %a, i64 %b) {
 ; CHECK-LABEL: test_igesll_store:
 ; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    sradi r6, r3, 63
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
-; CHECK-NEXT:    subfc r3, r4, r3
-; CHECK-NEXT:    rldicl r3, r4, 1, 63
-; CHECK-NEXT:    adde r3, r6, r3
-; CHECK-NEXT:    std r3, glob at toc@l(r5)
+; CHECK:    sradi r6, r3, 63
+; CHECK:    subfc r3, r4, r3
+; CHECK:    rldicl r3, r4, 1, 63
+; CHECK:    adde r3, r6, r3
+; CHECK:    std r3
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sge i64 %a, %b
@@ -81,12 +80,13 @@ define void @test_igesll_sext_store(i64
 ; CHECK-LABEL: test_igesll_sext_store:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    sradi r6, r3, 63
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    subfc r3, r4, r3
 ; CHECK-NEXT:    rldicl r3, r4, 1, 63
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    adde r3, r6, r3
 ; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    std r3, glob at toc@l(r5)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sge i64 %a, %b
@@ -98,10 +98,11 @@ entry:
 define void @test_igesll_z_store(i64 %a) {
 ; CHECK-LABEL: test_igesll_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    not r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    rldicl r3, r3, 1, 63
-; CHECK-NEXT:    std r3, glob at toc@l(r4)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sgt i64 %a, -1
@@ -113,10 +114,11 @@ entry:
 define void @test_igesll_sext_z_store(i64 %a) {
 ; CHECK-LABEL: test_igesll_sext_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    not r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    sradi r3, r3, 63
-; CHECK-NEXT:    std r3, glob at toc@l(r4)
+; CHECK-NEXT:    std r3,
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sgt i64 %a, -1

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesigess.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesigess.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesigess.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesigess.ll Fri Nov 16 11:24:23 2018
@@ -36,11 +36,12 @@ entry:
 define void @test_igess_store(i16 signext %a, i16 signext %b) {
 ; CHECK-LABEL: test_igess_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    sub r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    rldicl r3, r3, 1, 63
 ; CHECK-NEXT:    xori r3, r3, 1
-; CHECK-NEXT:    sth r3, glob at toc@l(r5)
+; CHECK-NEXT:    sth r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sge i16 %a, %b
@@ -52,11 +53,12 @@ entry:
 define void @test_igess_sext_store(i16 signext %a, i16 signext %b) {
 ; CHECK-LABEL: test_igess_sext_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    sub r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    rldicl r3, r3, 1, 63
 ; CHECK-NEXT:    addi r3, r3, -1
-; CHECK-NEXT:    sth r3, glob at toc@l(r5)
+; CHECK-NEXT:    sth r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sge i16 %a, %b

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesigtsc.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesigtsc.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesigtsc.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesigtsc.ll Fri Nov 16 11:24:23 2018
@@ -1,7 +1,7 @@
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:   --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:   --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
 

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesigtsi.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesigtsi.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesigtsi.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesigtsi.ll Fri Nov 16 11:24:23 2018
@@ -1,7 +1,7 @@
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
 

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesigtsll.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesigtsll.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesigtsll.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesigtsll.ll Fri Nov 16 11:24:23 2018
@@ -1,7 +1,7 @@
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
 

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesigtss.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesigtss.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesigtss.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesigtss.ll Fri Nov 16 11:24:23 2018
@@ -1,7 +1,7 @@
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:   --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:   --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
 

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesigtuc.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesigtuc.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesigtuc.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesigtuc.ll Fri Nov 16 11:24:23 2018
@@ -1,7 +1,7 @@
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
 

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesigtui.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesigtui.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesigtui.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesigtui.ll Fri Nov 16 11:24:23 2018
@@ -1,7 +1,7 @@
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
 

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesigtus.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesigtus.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesigtus.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesigtus.ll Fri Nov 16 11:24:23 2018
@@ -1,7 +1,7 @@
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
 

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesilesc.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesilesc.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesilesc.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesilesc.ll Fri Nov 16 11:24:23 2018
@@ -36,11 +36,12 @@ entry:
 define void @test_ilesc_store(i8 signext %a, i8 signext %b) {
 ; CHECK-LABEL: test_ilesc_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    sub r3, r4, r3
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    rldicl r3, r3, 1, 63
 ; CHECK-NEXT:    xori r3, r3, 1
-; CHECK-NEXT:    stb r3, glob at toc@l(r5)
+; CHECK-NEXT:    stb r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sle i8 %a, %b
@@ -52,11 +53,12 @@ entry:
 define void @test_ilesc_sext_store(i8 signext %a, i8 signext %b) {
 ; CHECK-LABEL: test_ilesc_sext_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    sub r3, r4, r3
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    rldicl r3, r3, 1, 63
 ; CHECK-NEXT:    addi r3, r3, -1
-; CHECK-NEXT:    stb r3, glob at toc@l(r5)
+; CHECK-NEXT:    stb r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sle i8 %a, %b

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesilesi.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesilesi.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesilesi.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesilesi.ll Fri Nov 16 11:24:23 2018
@@ -36,11 +36,12 @@ entry:
 define void @test_ilesi_store(i32 signext %a, i32 signext %b) {
 ; CHECK-LABEL: test_ilesi_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    sub r3, r4, r3
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    rldicl r3, r3, 1, 63
 ; CHECK-NEXT:    xori r3, r3, 1
-; CHECK-NEXT:    stw r3, glob at toc@l(r5)
+; CHECK-NEXT:    stw r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sle i32 %a, %b
@@ -52,11 +53,12 @@ entry:
 define void @test_ilesi_sext_store(i32 signext %a, i32 signext %b) {
 ; CHECK-LABEL: test_ilesi_sext_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    sub r3, r4, r3
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    rldicl r3, r3, 1, 63
 ; CHECK-NEXT:    addi r3, r3, -1
-; CHECK-NEXT:    stw r3, glob at toc@l(r5)
+; CHECK-NEXT:    stw r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sle i32 %a, %b

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesilesll.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesilesll.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesilesll.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesilesll.ll Fri Nov 16 11:24:23 2018
@@ -65,12 +65,13 @@ entry:
 define void @test_ilesll_store(i64 %a, i64 %b) {
 ; CHECK-LABEL: test_ilesll_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    sradi r6, r4, 63
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r5, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    subfc r4, r3, r4
 ; CHECK-NEXT:    rldicl r3, r3, 1, 63
 ; CHECK-NEXT:    adde r3, r6, r3
-; CHECK-NEXT:    std r3, glob at toc@l(r5)
+; CHECK-NEXT:    std r3, 0(r5)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sle i64 %a, %b
@@ -83,12 +84,13 @@ define void @test_ilesll_sext_store(i64
 ; CHECK-LABEL: test_ilesll_sext_store:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    sradi r6, r4, 63
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    subfc r4, r3, r4
 ; CHECK-NEXT:    rldicl r3, r3, 1, 63
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    adde r3, r6, r3
 ; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    std r3, glob at toc@l(r5)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sle i64 %a, %b
@@ -100,11 +102,12 @@ entry:
 define void @test_ilesll_z_store(i64 %a) {
 ; CHECK-LABEL: test_ilesll_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    addi r5, r3, -1
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    or r3, r5, r3
 ; CHECK-NEXT:    rldicl r3, r3, 1, 63
-; CHECK-NEXT:    std r3, glob at toc@l(r4)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp slt i64 %a, 1
@@ -116,11 +119,12 @@ entry:
 define void @test_ilesll_sext_z_store(i64 %a) {
 ; CHECK-LABEL: test_ilesll_sext_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    addi r5, r3, -1
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    or r3, r5, r3
 ; CHECK-NEXT:    sradi r3, r3, 63
-; CHECK-NEXT:    std r3, glob at toc@l(r4)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp slt i64 %a, 1

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesiless.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesiless.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesiless.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesiless.ll Fri Nov 16 11:24:23 2018
@@ -36,11 +36,12 @@ entry:
 define void @test_iless_store(i16 signext %a, i16 signext %b) {
 ; CHECK-LABEL: test_iless_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    sub r3, r4, r3
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    rldicl r3, r3, 1, 63
 ; CHECK-NEXT:    xori r3, r3, 1
-; CHECK-NEXT:    sth r3, glob at toc@l(r5)
+; CHECK-NEXT:    sth r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sle i16 %a, %b
@@ -52,11 +53,12 @@ entry:
 define void @test_iless_sext_store(i16 signext %a, i16 signext %b) {
 ; CHECK-LABEL: test_iless_sext_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    sub r3, r4, r3
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    rldicl r3, r3, 1, 63
 ; CHECK-NEXT:    addi r3, r3, -1
-; CHECK-NEXT:    sth r3, glob at toc@l(r5)
+; CHECK-NEXT:    sth r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sle i16 %a, %b

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesinesc.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesinesc.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesinesc.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesinesc.ll Fri Nov 16 11:24:23 2018
@@ -1,17 +1,16 @@
-; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
 
 @glob = common local_unnamed_addr global i8 0, align 1
 
 define signext i32 @test_inesc(i8 signext %a, i8 signext %b) {
 ; CHECK-LABEL: test_inesc:
-; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    xor r3, r3, r4
+; CHECK:    xor r3, r3, r4
 ; CHECK-NEXT:    cntlzw r3, r3
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    xori r3, r3, 1
@@ -24,8 +23,7 @@ entry:
 
 define signext i32 @test_inesc_sext(i8 signext %a, i8 signext %b) {
 ; CHECK-LABEL: test_inesc_sext:
-; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    xor r3, r3, r4
+; CHECK:    xor r3, r3, r4
 ; CHECK-NEXT:    cntlzw r3, r3
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    xori r3, r3, 1
@@ -39,8 +37,7 @@ entry:
 
 define signext i32 @test_inesc_z(i8 signext %a) {
 ; CHECK-LABEL: test_inesc_z:
-; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    cntlzw r3, r3
+; CHECK:    cntlzw r3, r3
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    xori r3, r3, 1
 ; CHECK-NEXT:    blr
@@ -52,8 +49,7 @@ entry:
 
 define signext i32 @test_inesc_sext_z(i8 signext %a) {
 ; CHECK-LABEL: test_inesc_sext_z:
-; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    cntlzw r3, r3
+; CHECK:    cntlzw r3, r3
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    xori r3, r3, 1
 ; CHECK-NEXT:    neg r3, r3
@@ -66,13 +62,11 @@ entry:
 
 define void @test_inesc_store(i8 signext %a, i8 signext %b) {
 ; CHECK-LABEL: test_inesc_store:
-; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
-; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    xori r3, r3, 1
-; CHECK-NEXT:    stb r3, glob at toc@l(r5)
+; CHECK:    xor r3, r3, r4
+; CHECK:    cntlzw r3, r3
+; CHECK:    srwi r3, r3, 5
+; CHECK:    xori r3, r3, 1
+; CHECK:    stb r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i8 %a, %b
@@ -83,14 +77,12 @@ entry:
 
 define void @test_inesc_sext_store(i8 signext %a, i8 signext %b) {
 ; CHECK-LABEL: test_inesc_sext_store:
-; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
-; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    xori r3, r3, 1
-; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    stb r3, glob at toc@l(r5)
+; CHECK:    xor r3, r3, r4
+; CHECK:    cntlzw r3, r3
+; CHECK:    srwi r3, r3, 5
+; CHECK:    xori r3, r3, 1
+; CHECK:    neg r3, r3
+; CHECK:    stb r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i8 %a, %b
@@ -101,12 +93,10 @@ entry:
 
 define void @test_inesc_z_store(i8 signext %a) {
 ; CHECK-LABEL: test_inesc_z_store:
-; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
-; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    xori r3, r3, 1
-; CHECK-NEXT:    stb r3, glob at toc@l(r4)
+; CHECK:    cntlzw r3, r3
+; CHECK:    srwi r3, r3, 5
+; CHECK:    xori r3, r3, 1
+; CHECK:    stb r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i8 %a, 0
@@ -117,13 +107,11 @@ entry:
 
 define void @test_inesc_sext_z_store(i8 signext %a) {
 ; CHECK-LABEL: test_inesc_sext_z_store:
-; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
-; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    xori r3, r3, 1
-; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    stb r3, glob at toc@l(r4)
+; CHECK:    cntlzw r3, r3
+; CHECK:    srwi r3, r3, 5
+; CHECK:    xori r3, r3, 1
+; CHECK:    neg r3, r3
+; CHECK:    stb r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i8 %a, 0

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesinesi.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesinesi.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesinesi.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesinesi.ll Fri Nov 16 11:24:23 2018
@@ -1,17 +1,16 @@
-; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
 
 @glob = common local_unnamed_addr global i32 0, align 4
 
 define signext i32 @test_inesi(i32 signext %a, i32 signext %b) {
 ; CHECK-LABEL: test_inesi:
-; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    xor r3, r3, r4
+; CHECK:    xor r3, r3, r4
 ; CHECK-NEXT:    cntlzw r3, r3
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    xori r3, r3, 1
@@ -24,8 +23,7 @@ entry:
 
 define signext i32 @test_inesi_sext(i32 signext %a, i32 signext %b) {
 ; CHECK-LABEL: test_inesi_sext:
-; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    xor r3, r3, r4
+; CHECK:    xor r3, r3, r4
 ; CHECK-NEXT:    cntlzw r3, r3
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    xori r3, r3, 1
@@ -39,8 +37,7 @@ entry:
 
 define signext i32 @test_inesi_z(i32 signext %a) {
 ; CHECK-LABEL: test_inesi_z:
-; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    cntlzw r3, r3
+; CHECK:    cntlzw r3, r3
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    xori r3, r3, 1
 ; CHECK-NEXT:    blr
@@ -52,8 +49,7 @@ entry:
 
 define signext i32 @test_inesi_sext_z(i32 signext %a) {
 ; CHECK-LABEL: test_inesi_sext_z:
-; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    cntlzw r3, r3
+; CHECK:    cntlzw r3, r3
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    xori r3, r3, 1
 ; CHECK-NEXT:    neg r3, r3
@@ -66,13 +62,11 @@ entry:
 
 define void @test_inesi_store(i32 signext %a, i32 signext %b) {
 ; CHECK-LABEL: test_inesi_store:
-; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
-; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    xori r3, r3, 1
-; CHECK-NEXT:    stw r3, glob at toc@l(r5)
+; CHECK:    xor r3, r3, r4
+; CHECK:    cntlzw r3, r3
+; CHECK:    srwi r3, r3, 5
+; CHECK:    xori r3, r3, 1
+; CHECK:    stw r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i32 %a, %b
@@ -83,14 +77,12 @@ entry:
 
 define void @test_inesi_sext_store(i32 signext %a, i32 signext %b) {
 ; CHECK-LABEL: test_inesi_sext_store:
-; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
-; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    xori r3, r3, 1
-; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    stw r3, glob at toc@l(r5)
+; CHECK:    xor r3, r3, r4
+; CHECK:    cntlzw r3, r3
+; CHECK:    srwi r3, r3, 5
+; CHECK:    xori r3, r3, 1
+; CHECK:    neg r3, r3
+; CHECK:    stw r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i32 %a, %b
@@ -101,12 +93,10 @@ entry:
 
 define void @test_inesi_z_store(i32 signext %a) {
 ; CHECK-LABEL: test_inesi_z_store:
-; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
-; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    xori r3, r3, 1
-; CHECK-NEXT:    stw r3, glob at toc@l(r4)
+; CHECK:    cntlzw r3, r3
+; CHECK:    srwi r3, r3, 5
+; CHECK:    xori r3, r3, 1
+; CHECK:    stw r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i32 %a, 0
@@ -117,13 +107,11 @@ entry:
 
 define void @test_inesi_sext_z_store(i32 signext %a) {
 ; CHECK-LABEL: test_inesi_sext_z_store:
-; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
-; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    xori r3, r3, 1
-; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    stw r3, glob at toc@l(r4)
+; CHECK:    cntlzw r3, r3
+; CHECK:    srwi r3, r3, 5
+; CHECK:    xori r3, r3, 1
+; CHECK:    neg r3, r3
+; CHECK:    stw r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i32 %a, 0

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesinesll.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesinesll.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesinesll.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesinesll.ll Fri Nov 16 11:24:23 2018
@@ -61,11 +61,12 @@ entry:
 define void @test_inesll_store(i64 %a, i64 %b) {
 ; CHECK-LABEL: test_inesll_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
-; CHECK-NEXT:    addic r4, r3, -1
-; CHECK-NEXT:    subfe r3, r4, r3
-; CHECK-NEXT:    std r3, glob at toc@l(r5)
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
+; CHECK-NEXT:    addic r5, r3, -1
+; CHECK-NEXT:    subfe r3, r5, r3
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i64 %a, %b
@@ -77,11 +78,12 @@ entry:
 define void @test_inesll_sext_store(i64 %a, i64 %b) {
 ; CHECK-LABEL: test_inesll_sext_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    subfic r3, r3, 0
 ; CHECK-NEXT:    subfe r3, r3, r3
-; CHECK-NEXT:    std r3, glob at toc@l(r5)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i64 %a, %b
@@ -93,10 +95,11 @@ entry:
 define void @test_inesll_z_store(i64 %a) {
 ; CHECK-LABEL: test_inesll_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    addic r5, r3, -1
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    subfe r3, r5, r3
-; CHECK-NEXT:    std r3, glob at toc@l(r4)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i64 %a, 0
@@ -108,10 +111,11 @@ entry:
 define void @test_inesll_sext_z_store(i64 %a) {
 ; CHECK-LABEL: test_inesll_sext_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    subfic r3, r3, 0
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    subfe r3, r3, r3
-; CHECK-NEXT:    std r3, glob at toc@l(r4)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i64 %a, 0

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesiness.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesiness.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesiness.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesiness.ll Fri Nov 16 11:24:23 2018
@@ -1,17 +1,16 @@
-; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
 
 @glob = common local_unnamed_addr global i16 0, align 2
 
 define signext i32 @test_iness(i16 signext %a, i16 signext %b) {
 ; CHECK-LABEL: test_iness:
-; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    xor r3, r3, r4
+; CHECK:    xor r3, r3, r4
 ; CHECK-NEXT:    cntlzw r3, r3
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    xori r3, r3, 1
@@ -24,8 +23,7 @@ entry:
 
 define signext i32 @test_iness_sext(i16 signext %a, i16 signext %b) {
 ; CHECK-LABEL: test_iness_sext:
-; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    xor r3, r3, r4
+; CHECK:    xor r3, r3, r4
 ; CHECK-NEXT:    cntlzw r3, r3
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    xori r3, r3, 1
@@ -39,8 +37,7 @@ entry:
 
 define signext i32 @test_iness_z(i16 signext %a) {
 ; CHECK-LABEL: test_iness_z:
-; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    cntlzw r3, r3
+; CHECK:    cntlzw r3, r3
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    xori r3, r3, 1
 ; CHECK-NEXT:    blr
@@ -52,8 +49,7 @@ entry:
 
 define signext i32 @test_iness_sext_z(i16 signext %a) {
 ; CHECK-LABEL: test_iness_sext_z:
-; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    cntlzw r3, r3
+; CHECK:    cntlzw r3, r3
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    xori r3, r3, 1
 ; CHECK-NEXT:    neg r3, r3
@@ -66,13 +62,11 @@ entry:
 
 define void @test_iness_store(i16 signext %a, i16 signext %b) {
 ; CHECK-LABEL: test_iness_store:
-; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
-; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    xori r3, r3, 1
-; CHECK-NEXT:    sth r3, glob at toc@l(r5)
+; CHECK:    xor r3, r3, r4
+; CHECK:    cntlzw r3, r3
+; CHECK:    srwi r3, r3, 5
+; CHECK:    xori r3, r3, 1
+; CHECK:    sth r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i16 %a, %b
@@ -83,14 +77,12 @@ entry:
 
 define void @test_iness_sext_store(i16 signext %a, i16 signext %b) {
 ; CHECK-LABEL: test_iness_sext_store:
-; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
-; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    xori r3, r3, 1
-; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    sth r3, glob at toc@l(r5)
+; CHECK:    xor r3, r3, r4
+; CHECK:    cntlzw r3, r3
+; CHECK:    srwi r3, r3, 5
+; CHECK:    xori r3, r3, 1
+; CHECK:    neg r3, r3
+; CHECK:    sth r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i16 %a, %b
@@ -101,12 +93,10 @@ entry:
 
 define void @test_iness_z_store(i16 signext %a) {
 ; CHECK-LABEL: test_iness_z_store:
-; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
-; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    xori r3, r3, 1
-; CHECK-NEXT:    sth r3, glob at toc@l(r4)
+; CHECK:    cntlzw r3, r3
+; CHECK:    srwi r3, r3, 5
+; CHECK:    xori r3, r3, 1
+; CHECK:    sth r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i16 %a, 0
@@ -117,13 +107,11 @@ entry:
 
 define void @test_iness_sext_z_store(i16 signext %a) {
 ; CHECK-LABEL: test_iness_sext_z_store:
-; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
-; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    xori r3, r3, 1
-; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    sth r3, glob at toc@l(r4)
+; CHECK:    cntlzw r3, r3
+; CHECK:    srwi r3, r3, 5
+; CHECK:    xori r3, r3, 1
+; CHECK:    neg r3, r3
+; CHECK:    sth r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i16 %a, 0

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesineuc.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesineuc.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesineuc.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesineuc.ll Fri Nov 16 11:24:23 2018
@@ -66,12 +66,13 @@ entry:
 define void @test_ineuc_store(i8 zeroext %a, i8 zeroext %b) {
 ; CHECK-LABEL: test_ineuc_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    xori r3, r3, 1
-; CHECK-NEXT:    stb r3, glob at toc@l(r5)
+; CHECK-NEXT:    stb r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i8 %a, %b
@@ -84,12 +85,13 @@ define void @test_ineuc_sext_store(i8 ze
 ; CHECK-LABEL: test_ineuc_sext_store:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    xori r3, r3, 1
 ; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    stb r3, glob at toc@l(r5)
+; CHECK-NEXT:    stb r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i8 %a, %b
@@ -101,11 +103,12 @@ entry:
 define void @test_ineuc_z_store(i8 zeroext %a) {
 ; CHECK-LABEL: test_ineuc_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    xori r3, r3, 1
-; CHECK-NEXT:    stb r3, glob at toc@l(r4)
+; CHECK-NEXT:    stb r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i8 %a, 0
@@ -117,12 +120,13 @@ entry:
 define void @test_ineuc_sext_z_store(i8 zeroext %a) {
 ; CHECK-LABEL: test_ineuc_sext_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
 ; CHECK-NEXT:    srwi r3, r3, 5
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    xori r3, r3, 1
 ; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    stb r3, glob at toc@l(r4)
+; CHECK-NEXT:    stb r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i8 %a, 0

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesineui.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesineui.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesineui.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesineui.ll Fri Nov 16 11:24:23 2018
@@ -1,17 +1,16 @@
-; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
 
 @glob = common local_unnamed_addr global i32 0, align 4
 
 define signext i32 @test_ineui(i32 zeroext %a, i32 zeroext %b) {
 ; CHECK-LABEL: test_ineui:
-; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    xor r3, r3, r4
+; CHECK:    xor r3, r3, r4
 ; CHECK-NEXT:    cntlzw r3, r3
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    xori r3, r3, 1
@@ -24,8 +23,7 @@ entry:
 
 define signext i32 @test_ineui_sext(i32 zeroext %a, i32 zeroext %b) {
 ; CHECK-LABEL: test_ineui_sext:
-; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    xor r3, r3, r4
+; CHECK:    xor r3, r3, r4
 ; CHECK-NEXT:    cntlzw r3, r3
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    xori r3, r3, 1
@@ -39,8 +37,7 @@ entry:
 
 define signext i32 @test_ineui_z(i32 zeroext %a) {
 ; CHECK-LABEL: test_ineui_z:
-; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    cntlzw r3, r3
+; CHECK:    cntlzw r3, r3
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    xori r3, r3, 1
 ; CHECK-NEXT:    blr
@@ -52,8 +49,7 @@ entry:
 
 define signext i32 @test_ineui_sext_z(i32 zeroext %a) {
 ; CHECK-LABEL: test_ineui_sext_z:
-; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    cntlzw r3, r3
+; CHECK:    cntlzw r3, r3
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    xori r3, r3, 1
 ; CHECK-NEXT:    neg r3, r3
@@ -66,13 +62,11 @@ entry:
 
 define void @test_ineui_store(i32 zeroext %a, i32 zeroext %b) {
 ; CHECK-LABEL: test_ineui_store:
-; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
-; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    xori r3, r3, 1
-; CHECK-NEXT:    stw r3, glob at toc@l(r5)
+; CHECK:    xor r3, r3, r4
+; CHECK:    cntlzw r3, r3
+; CHECK:    srwi r3, r3, 5
+; CHECK:    xori r3, r3, 1
+; CHECK:    stw r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i32 %a, %b
@@ -83,14 +77,12 @@ entry:
 
 define void @test_ineui_sext_store(i32 zeroext %a, i32 zeroext %b) {
 ; CHECK-LABEL: test_ineui_sext_store:
-; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
-; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    xori r3, r3, 1
-; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    stw r3, glob at toc@l(r5)
+; CHECK:    xor r3, r3, r4
+; CHECK:    cntlzw r3, r3
+; CHECK:    srwi r3, r3, 5
+; CHECK:    xori r3, r3, 1
+; CHECK:    neg r3, r3
+; CHECK:    stw r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i32 %a, %b
@@ -101,12 +93,10 @@ entry:
 
 define void @test_ineui_z_store(i32 zeroext %a) {
 ; CHECK-LABEL: test_ineui_z_store:
-; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
-; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    xori r3, r3, 1
-; CHECK-NEXT:    stw r3, glob at toc@l(r4)
+; CHECK:    cntlzw r3, r3
+; CHECK:    srwi r3, r3, 5
+; CHECK:    xori r3, r3, 1
+; CHECK:    stw r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i32 %a, 0
@@ -117,13 +107,11 @@ entry:
 
 define void @test_ineui_sext_z_store(i32 zeroext %a) {
 ; CHECK-LABEL: test_ineui_sext_z_store:
-; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
-; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    xori r3, r3, 1
-; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    stw r3, glob at toc@l(r4)
+; CHECK:    cntlzw r3, r3
+; CHECK:    srwi r3, r3, 5
+; CHECK:    xori r3, r3, 1
+; CHECK:    neg r3, r3
+; CHECK:    stw r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i32 %a, 0

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesineull.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesineull.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesineull.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesineull.ll Fri Nov 16 11:24:23 2018
@@ -61,11 +61,12 @@ entry:
 define void @test_ineull_store(i64 %a, i64 %b) {
 ; CHECK-LABEL: test_ineull_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
-; CHECK-NEXT:    addic r4, r3, -1
-; CHECK-NEXT:    subfe r3, r4, r3
-; CHECK-NEXT:    std r3, glob at toc@l(r5)
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
+; CHECK-NEXT:    addic r5, r3, -1
+; CHECK-NEXT:    subfe r3, r5, r3
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i64 %a, %b
@@ -77,11 +78,12 @@ entry:
 define void @test_ineull_sext_store(i64 %a, i64 %b) {
 ; CHECK-LABEL: test_ineull_sext_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    subfic r3, r3, 0
 ; CHECK-NEXT:    subfe r3, r3, r3
-; CHECK-NEXT:    std r3, glob at toc@l(r5)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i64 %a, %b
@@ -93,10 +95,11 @@ entry:
 define void @test_ineull_z_store(i64 %a) {
 ; CHECK-LABEL: test_ineull_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    addic r5, r3, -1
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    subfe r3, r5, r3
-; CHECK-NEXT:    std r3, glob at toc@l(r4)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i64 %a, 0
@@ -108,10 +111,11 @@ entry:
 define void @test_ineull_sext_z_store(i64 %a) {
 ; CHECK-LABEL: test_ineull_sext_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    subfic r3, r3, 0
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    subfe r3, r3, r3
-; CHECK-NEXT:    std r3, glob at toc@l(r4)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i64 %a, 0

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesineus.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesineus.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesineus.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesineus.ll Fri Nov 16 11:24:23 2018
@@ -67,12 +67,13 @@ entry:
 define void @test_ineus_store(i16 zeroext %a, i16 zeroext %b) {
 ; CHECK-LABEL: test_ineus_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    xori r3, r3, 1
-; CHECK-NEXT:    sth r3, glob at toc@l(r5)
+; CHECK-NEXT:    sth r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i16 %a, %b
@@ -85,12 +86,13 @@ define void @test_ineus_sext_store(i16 z
 ; CHECK-LABEL: test_ineus_sext_store:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    xori r3, r3, 1
 ; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    sth r3, glob at toc@l(r5)
+; CHECK-NEXT:    sth r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i16 %a, %b
@@ -102,11 +104,12 @@ entry:
 define void @test_ineus_z_store(i16 zeroext %a) {
 ; CHECK-LABEL: test_ineus_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    xori r3, r3, 1
-; CHECK-NEXT:    sth r3, glob at toc@l(r4)
+; CHECK-NEXT:    sth r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i16 %a, 0
@@ -118,12 +121,13 @@ entry:
 define void @test_ineus_sext_z_store(i16 zeroext %a) {
 ; CHECK-LABEL: test_ineus_sext_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
 ; CHECK-NEXT:    srwi r3, r3, 5
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    xori r3, r3, 1
 ; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    sth r3, glob at toc@l(r4)
+; CHECK-NEXT:    sth r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i16 %a, 0

Modified: llvm/trunk/test/CodeGen/PowerPC/testCompareslleqsc.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testCompareslleqsc.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testCompareslleqsc.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testCompareslleqsc.ll Fri Nov 16 11:24:23 2018
@@ -69,11 +69,12 @@ entry:
 define void @test_lleqsc_store(i8 signext %a, i8 signext %b) {
 ; CHECK-LABEL: test_lleqsc_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    cntlzw r3, r3
 ; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    stb r3, glob at toc@l(r5)
+; CHECK-NEXT:    stb r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i8 %a, %b
@@ -86,12 +87,13 @@ entry:
 define void @test_lleqsc_sext_store(i8 signext %a, i8 signext %b) {
 ; CHECK-LABEL: test_lleqsc_sext_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    stb r3, glob at toc@l(r5)
+; CHECK-NEXT:    stb r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i8 %a, %b
@@ -104,10 +106,11 @@ entry:
 define void @test_lleqsc_z_store(i8 signext %a) {
 ; CHECK-LABEL: test_lleqsc_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    stb r3, glob at toc@l(r4)
+; CHECK-NEXT:    stb r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i8 %a, 0
@@ -120,11 +123,12 @@ entry:
 define void @test_lleqsc_sext_z_store(i8 signext %a) {
 ; CHECK-LABEL: test_lleqsc_sext_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    stb r3, glob at toc@l(r4)
+; CHECK-NEXT:    stb r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i8 %a, 0

Modified: llvm/trunk/test/CodeGen/PowerPC/testCompareslleqsi.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testCompareslleqsi.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testCompareslleqsi.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testCompareslleqsi.ll Fri Nov 16 11:24:23 2018
@@ -68,11 +68,12 @@ entry:
 define void @test_lleqsi_store(i32 signext %a, i32 signext %b) {
 ; CHECK-LABEL: test_lleqsi_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    cntlzw r3, r3
 ; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    stw r3, glob at toc@l(r5)
+; CHECK-NEXT:    stw r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i32 %a, %b
@@ -85,12 +86,13 @@ entry:
 define void @test_lleqsi_sext_store(i32 signext %a, i32 signext %b) {
 ; CHECK-LABEL: test_lleqsi_sext_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    stw r3, glob at toc@l(r5)
+; CHECK-NEXT:    stw r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i32 %a, %b
@@ -103,10 +105,11 @@ entry:
 define void @test_lleqsi_z_store(i32 signext %a) {
 ; CHECK-LABEL: test_lleqsi_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    stw r3, glob at toc@l(r4)
+; CHECK-NEXT:    stw r3, 0(r4)
 ; CHECK-NEXT:    blr
 ; CHECKNEXT:    blr
 entry:
@@ -120,11 +123,12 @@ entry:
 define void @test_lleqsi_sext_z_store(i32 signext %a) {
 ; CHECK-LABEL: test_lleqsi_sext_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    stw r3, glob at toc@l(r4)
+; CHECK-NEXT:    stw r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i32 %a, 0

Modified: llvm/trunk/test/CodeGen/PowerPC/testCompareslleqsll.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testCompareslleqsll.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testCompareslleqsll.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testCompareslleqsll.ll Fri Nov 16 11:24:23 2018
@@ -66,11 +66,12 @@ entry:
 define void @test_lleqsll_store(i64 %a, i64 %b) {
 ; CHECK-LABEL: test_lleqsll_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    cntlzd r3, r3
 ; CHECK-NEXT:    rldicl r3, r3, 58, 63
-; CHECK-NEXT:    std r3, glob at toc@l(r5)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i64 %a, %b
@@ -83,11 +84,12 @@ entry:
 define void @test_lleqsll_sext_store(i64 %a, i64 %b) {
 ; CHECK-LABEL: test_lleqsll_sext_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    addic r3, r3, -1
 ; CHECK-NEXT:    subfe r3, r3, r3
-; CHECK-NEXT:    std r3, glob at toc@l(r5)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i64 %a, %b
@@ -100,10 +102,11 @@ entry:
 define void @test_lleqsll_z_store(i64 %a) {
 ; CHECK-LABEL: test_lleqsll_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    cntlzd r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    rldicl r3, r3, 58, 63
-; CHECK-NEXT:    std r3, glob at toc@l(r4)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i64 %a, 0
@@ -116,10 +119,11 @@ entry:
 define void @test_lleqsll_sext_z_store(i64 %a) {
 ; CHECK-LABEL: test_lleqsll_sext_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    addic r3, r3, -1
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    subfe r3, r3, r3
-; CHECK-NEXT:    std r3, glob at toc@l(r4)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i64 %a, 0

Modified: llvm/trunk/test/CodeGen/PowerPC/testCompareslleqss.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testCompareslleqss.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testCompareslleqss.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testCompareslleqss.ll Fri Nov 16 11:24:23 2018
@@ -68,11 +68,12 @@ entry:
 define void @test_lleqss_store(i16 signext %a, i16 signext %b) {
 ; CHECK-LABEL: test_lleqss_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    cntlzw r3, r3
 ; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    sth r3, glob at toc@l(r5)
+; CHECK-NEXT:    sth r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i16 %a, %b
@@ -85,12 +86,13 @@ entry:
 define void @test_lleqss_sext_store(i16 signext %a, i16 signext %b) {
 ; CHECK-LABEL: test_lleqss_sext_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    sth r3, glob at toc@l(r5)
+; CHECK-NEXT:    sth r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i16 %a, %b
@@ -103,10 +105,11 @@ entry:
 define void @test_lleqss_z_store(i16 signext %a) {
 ; CHECK-LABEL: test_lleqss_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    sth r3, glob at toc@l(r4)
+; CHECK-NEXT:    sth r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i16 %a, 0
@@ -119,11 +122,12 @@ entry:
 define void @test_lleqss_sext_z_store(i16 signext %a) {
 ; CHECK-LABEL: test_lleqss_sext_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    sth r3, glob at toc@l(r4)
+; CHECK-NEXT:    sth r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i16 %a, 0

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesllequc.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesllequc.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesllequc.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesllequc.ll Fri Nov 16 11:24:23 2018
@@ -68,11 +68,12 @@ entry:
 define void @test_llequc_store(i8 zeroext %a, i8 zeroext %b) {
 ; CHECK-LABEL: test_llequc_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    cntlzw r3, r3
 ; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    stb r3, glob at toc@l(r5)
+; CHECK-NEXT:    stb r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i8 %a, %b
@@ -85,12 +86,13 @@ entry:
 define void @test_llequc_sext_store(i8 zeroext %a, i8 zeroext %b) {
 ; CHECK-LABEL: test_llequc_sext_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    stb r3, glob at toc@l(r5)
+; CHECK-NEXT:    stb r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i8 %a, %b
@@ -103,10 +105,11 @@ entry:
 define void @test_llequc_z_store(i8 zeroext %a) {
 ; CHECK-LABEL: test_llequc_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    stb r3, glob at toc@l(r4)
+; CHECK-NEXT:    stb r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i8 %a, 0
@@ -119,11 +122,12 @@ entry:
 define void @test_llequc_sext_z_store(i8 zeroext %a) {
 ; CHECK-LABEL: test_llequc_sext_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    stb r3, glob at toc@l(r4)
+; CHECK-NEXT:    stb r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i8 %a, 0

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesllequi.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesllequi.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesllequi.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesllequi.ll Fri Nov 16 11:24:23 2018
@@ -68,11 +68,12 @@ entry:
 define void @test_llequi_store(i32 zeroext %a, i32 zeroext %b) {
 ; CHECK-LABEL: test_llequi_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    cntlzw r3, r3
 ; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    stw r3, glob at toc@l(r5)
+; CHECK-NEXT:    stw r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i32 %a, %b
@@ -85,12 +86,13 @@ entry:
 define void @test_llequi_sext_store(i32 zeroext %a, i32 zeroext %b) {
 ; CHECK-LABEL: test_llequi_sext_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    stw r3, glob at toc@l(r5)
+; CHECK-NEXT:    stw r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i32 %a, %b
@@ -103,10 +105,11 @@ entry:
 define void @test_llequi_z_store(i32 zeroext %a) {
 ; CHECK-LABEL: test_llequi_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    stw r3, glob at toc@l(r4)
+; CHECK-NEXT:    stw r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i32 %a, 0
@@ -119,11 +122,12 @@ entry:
 define void @test_llequi_sext_z_store(i32 zeroext %a) {
 ; CHECK-LABEL: test_llequi_sext_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    stw r3, glob at toc@l(r4)
+; CHECK-NEXT:    stw r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i32 %a, 0

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesllequll.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesllequll.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesllequll.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesllequll.ll Fri Nov 16 11:24:23 2018
@@ -66,11 +66,12 @@ entry:
 define void @test_llequll_store(i64 %a, i64 %b) {
 ; CHECK-LABEL: test_llequll_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    cntlzd r3, r3
 ; CHECK-NEXT:    rldicl r3, r3, 58, 63
-; CHECK-NEXT:    std r3, glob at toc@l(r5)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i64 %a, %b
@@ -83,11 +84,12 @@ entry:
 define void @test_llequll_sext_store(i64 %a, i64 %b) {
 ; CHECK-LABEL: test_llequll_sext_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    addic r3, r3, -1
 ; CHECK-NEXT:    subfe r3, r3, r3
-; CHECK-NEXT:    std r3, glob at toc@l(r5)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i64 %a, %b
@@ -100,10 +102,11 @@ entry:
 define void @test_llequll_z_store(i64 %a) {
 ; CHECK-LABEL: test_llequll_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    cntlzd r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    rldicl r3, r3, 58, 63
-; CHECK-NEXT:    std r3, glob at toc@l(r4)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i64 %a, 0
@@ -116,10 +119,11 @@ entry:
 define void @test_llequll_sext_z_store(i64 %a) {
 ; CHECK-LABEL: test_llequll_sext_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    addic r3, r3, -1
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    subfe r3, r3, r3
-; CHECK-NEXT:    std r3, glob at toc@l(r4)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i64 %a, 0

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesllequs.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesllequs.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesllequs.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesllequs.ll Fri Nov 16 11:24:23 2018
@@ -68,11 +68,12 @@ entry:
 define void @test_llequs_store(i16 zeroext %a, i16 zeroext %b) {
 ; CHECK-LABEL: test_llequs_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    cntlzw r3, r3
 ; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    sth r3, glob at toc@l(r5)
+; CHECK-NEXT:    sth r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i16 %a, %b
@@ -85,12 +86,13 @@ entry:
 define void @test_llequs_sext_store(i16 zeroext %a, i16 zeroext %b) {
 ; CHECK-LABEL: test_llequs_sext_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    sth r3, glob at toc@l(r5)
+; CHECK-NEXT:    sth r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i16 %a, %b
@@ -103,10 +105,11 @@ entry:
 define void @test_llequs_z_store(i16 zeroext %a) {
 ; CHECK-LABEL: test_llequs_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    srwi r3, r3, 5
-; CHECK-NEXT:    sth r3, glob at toc@l(r4)
+; CHECK-NEXT:    sth r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i16 %a, 0
@@ -119,11 +122,12 @@ entry:
 define void @test_llequs_sext_z_store(i16 zeroext %a) {
 ; CHECK-LABEL: test_llequs_sext_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    cntlzw r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    srwi r3, r3, 5
 ; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    sth r3, glob at toc@l(r4)
+; CHECK-NEXT:    sth r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp eq i16 %a, 0

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesllgesc.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesllgesc.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesllgesc.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesllgesc.ll Fri Nov 16 11:24:23 2018
@@ -36,11 +36,12 @@ entry:
 define void @test_llgesc_store(i8 signext %a, i8 signext %b) {
 ; CHECK-LABEL: test_llgesc_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    sub r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    rldicl r3, r3, 1, 63
 ; CHECK-NEXT:    xori r3, r3, 1
-; CHECK-NEXT:    stb r3, glob at toc@l(r5)
+; CHECK-NEXT:    stb r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sge i8 %a, %b
@@ -52,11 +53,12 @@ entry:
 define void @test_llgesc_sext_store(i8 signext %a, i8 signext %b) {
 ; CHECK-LABEL: test_llgesc_sext_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    sub r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    rldicl r3, r3, 1, 63
 ; CHECK-NEXT:    addi r3, r3, -1
-; CHECK-NEXT:    stb r3, glob at toc@l(r5)
+; CHECK-NEXT:    stb r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sge i8 %a, %b

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesllgesi.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesllgesi.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesllgesi.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesllgesi.ll Fri Nov 16 11:24:23 2018
@@ -36,11 +36,12 @@ entry:
 define void @test_llgesi_store(i32 signext %a, i32 signext %b) {
 ; CHECK-LABEL: test_llgesi_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    sub r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    rldicl r3, r3, 1, 63
 ; CHECK-NEXT:    xori r3, r3, 1
-; CHECK-NEXT:    stw r3, glob at toc@l(r5)
+; CHECK-NEXT:    stw r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sge i32 %a, %b
@@ -52,11 +53,12 @@ entry:
 define void @test_llgesi_sext_store(i32 signext %a, i32 signext %b) {
 ; CHECK-LABEL: test_llgesi_sext_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    sub r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    rldicl r3, r3, 1, 63
 ; CHECK-NEXT:    addi r3, r3, -1
-; CHECK-NEXT:    stw r3, glob at toc@l(r5)
+; CHECK-NEXT:    stw r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sge i32 %a, %b

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesllgesll.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesllgesll.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesllgesll.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesllgesll.ll Fri Nov 16 11:24:23 2018
@@ -1,10 +1,10 @@
-; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
 @glob = common local_unnamed_addr global i64 0, align 8
 
 define i64 @test_llgesll(i64 %a, i64 %b) {
@@ -63,12 +63,11 @@ entry:
 define void @test_llgesll_store(i64 %a, i64 %b) {
 ; CHECK-LABEL: test_llgesll_store:
 ; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    sradi r6, r3, 63
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
-; CHECK-NEXT:    subfc r3, r4, r3
-; CHECK-NEXT:    rldicl r3, r4, 1, 63
-; CHECK-NEXT:    adde r3, r6, r3
-; CHECK-NEXT:    std r3, glob at toc@l(r5)
+; CHECK:    sradi r6, r3, 63
+; CHECK:    subfc r3, r4, r3
+; CHECK:    rldicl r3, r4, 1, 63
+; CHECK:    adde r3, r6, r3
+; CHECK:    std r3,
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sge i64 %a, %b
@@ -81,12 +80,13 @@ define void @test_llgesll_sext_store(i64
 ; CHECK-LABEL: test_llgesll_sext_store:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    sradi r6, r3, 63
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    subfc r3, r4, r3
 ; CHECK-NEXT:    rldicl r3, r4, 1, 63
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    adde r3, r6, r3
 ; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    std r3, glob at toc@l(r5)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sge i64 %a, %b
@@ -98,10 +98,11 @@ entry:
 define void @test_llgesll_z_store(i64 %a) {
 ; CHECK-LABEL: test_llgesll_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    not r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    rldicl r3, r3, 1, 63
-; CHECK-NEXT:    std r3, glob at toc@l(r4)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sgt i64 %a, -1
@@ -113,10 +114,11 @@ entry:
 define void @test_llgesll_sext_z_store(i64 %a) {
 ; CHECK-LABEL: test_llgesll_sext_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    not r3, r3
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    sradi r3, r3, 63
-; CHECK-NEXT:    std r3, glob at toc@l(r4)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sgt i64 %a, -1

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesllgess.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesllgess.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesllgess.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesllgess.ll Fri Nov 16 11:24:23 2018
@@ -36,11 +36,12 @@ entry:
 define void @test_llgess_store(i16 signext %a, i16 signext %b) {
 ; CHECK-LABEL: test_llgess_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    sub r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    rldicl r3, r3, 1, 63
 ; CHECK-NEXT:    xori r3, r3, 1
-; CHECK-NEXT:    sth r3, glob at toc@l(r5)
+; CHECK-NEXT:    sth r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sge i16 %a, %b
@@ -52,11 +53,12 @@ entry:
 define void @test_llgess_sext_store(i16 signext %a, i16 signext %b) {
 ; CHECK-LABEL: test_llgess_sext_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    sub r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    rldicl r3, r3, 1, 63
 ; CHECK-NEXT:    addi r3, r3, -1
-; CHECK-NEXT:    sth r3, glob at toc@l(r5)
+; CHECK-NEXT:    sth r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sge i16 %a, %b

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesllgtsll.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesllgtsll.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesllgtsll.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesllgtsll.ll Fri Nov 16 11:24:23 2018
@@ -1,7 +1,7 @@
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
 

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesllgtuc.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesllgtuc.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesllgtuc.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesllgtuc.ll Fri Nov 16 11:24:23 2018
@@ -1,7 +1,7 @@
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
 

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesllgtui.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesllgtui.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesllgtui.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesllgtui.ll Fri Nov 16 11:24:23 2018
@@ -1,7 +1,7 @@
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
 

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesllgtus.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesllgtus.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesllgtus.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesllgtus.ll Fri Nov 16 11:24:23 2018
@@ -1,7 +1,7 @@
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
 

Modified: llvm/trunk/test/CodeGen/PowerPC/testCompareslllesc.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testCompareslllesc.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testCompareslllesc.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testCompareslllesc.ll Fri Nov 16 11:24:23 2018
@@ -37,11 +37,12 @@ entry:
 define void @test_lllesc_store(i8 signext %a, i8 signext %b) {
 ; CHECK-LABEL: test_lllesc_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    sub r3, r4, r3
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    rldicl r3, r3, 1, 63
 ; CHECK-NEXT:    xori r3, r3, 1
-; CHECK-NEXT:    stb r3, glob at toc@l(r5)
+; CHECK-NEXT:    stb r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sle i8 %a, %b
@@ -53,11 +54,12 @@ entry:
 define void @test_lllesc_sext_store(i8 signext %a, i8 signext %b) {
 ; CHECK-LABEL: test_lllesc_sext_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    sub r3, r4, r3
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    rldicl r3, r3, 1, 63
 ; CHECK-NEXT:    addi r3, r3, -1
-; CHECK-NEXT:    stb r3, glob at toc@l(r5)
+; CHECK-NEXT:    stb r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sle i8 %a, %b

Modified: llvm/trunk/test/CodeGen/PowerPC/testCompareslllesi.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testCompareslllesi.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testCompareslllesi.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testCompareslllesi.ll Fri Nov 16 11:24:23 2018
@@ -37,11 +37,12 @@ entry:
 define void @test_lllesi_store(i32 signext %a, i32 signext %b) {
 ; CHECK-LABEL: test_lllesi_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    sub r3, r4, r3
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    rldicl r3, r3, 1, 63
 ; CHECK-NEXT:    xori r3, r3, 1
-; CHECK-NEXT:    stw r3, glob at toc@l(r5)
+; CHECK-NEXT:    stw r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sle i32 %a, %b
@@ -53,11 +54,12 @@ entry:
 define void @test_lllesi_sext_store(i32 signext %a, i32 signext %b) {
 ; CHECK-LABEL: test_lllesi_sext_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    sub r3, r4, r3
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    rldicl r3, r3, 1, 63
 ; CHECK-NEXT:    addi r3, r3, -1
-; CHECK-NEXT:    stw r3, glob at toc@l(r5)
+; CHECK-NEXT:    stw r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sle i32 %a, %b

Modified: llvm/trunk/test/CodeGen/PowerPC/testCompareslllesll.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testCompareslllesll.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testCompareslllesll.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testCompareslllesll.ll Fri Nov 16 11:24:23 2018
@@ -70,12 +70,13 @@ entry:
 define void @test_lllesll_store(i64 %a, i64 %b) {
 ; CHECK-LABEL: test_lllesll_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    sradi r6, r4, 63
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r5, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    subfc r4, r3, r4
 ; CHECK-NEXT:    rldicl r3, r3, 1, 63
 ; CHECK-NEXT:    adde r3, r6, r3
-; CHECK-NEXT:    std r3, glob at toc@l(r5)
+; CHECK-NEXT:    std r3, 0(r5)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sle i64 %a, %b
@@ -89,12 +90,13 @@ define void @test_lllesll_sext_store(i64
 ; CHECK-LABEL: test_lllesll_sext_store:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    sradi r6, r4, 63
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    subfc r4, r3, r4
 ; CHECK-NEXT:    rldicl r3, r3, 1, 63
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    adde r3, r6, r3
 ; CHECK-NEXT:    neg r3, r3
-; CHECK-NEXT:    std r3, glob at toc@l(r5)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sle i64 %a, %b
@@ -107,11 +109,12 @@ entry:
 define void @test_lllesll_z_store(i64 %a) {
 ; CHECK-LABEL: test_lllesll_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    addi r5, r3, -1
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    or r3, r5, r3
 ; CHECK-NEXT:    rldicl r3, r3, 1, 63
-; CHECK-NEXT:    std r3, glob at toc@l(r4)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp slt i64 %a, 1
@@ -124,11 +127,12 @@ entry:
 define void @test_lllesll_sext_z_store(i64 %a) {
 ; CHECK-LABEL: test_lllesll_sext_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    addi r5, r3, -1
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    or r3, r5, r3
 ; CHECK-NEXT:    sradi r3, r3, 63
-; CHECK-NEXT:    std r3, glob at toc@l(r4)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp slt i64 %a, 1

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesllless.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesllless.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesllless.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesllless.ll Fri Nov 16 11:24:23 2018
@@ -37,11 +37,12 @@ entry:
 define void @test_llless_store(i16 signext %a, i16 signext %b) {
 ; CHECK-LABEL: test_llless_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    sub r3, r4, r3
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    rldicl r3, r3, 1, 63
 ; CHECK-NEXT:    xori r3, r3, 1
-; CHECK-NEXT:    sth r3, glob at toc@l(r5)
+; CHECK-NEXT:    sth r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sle i16 %a, %b
@@ -53,11 +54,12 @@ entry:
 define void @test_llless_sext_store(i16 signext %a, i16 signext %b) {
 ; CHECK-LABEL: test_llless_sext_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    sub r3, r4, r3
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    rldicl r3, r3, 1, 63
 ; CHECK-NEXT:    addi r3, r3, -1
-; CHECK-NEXT:    sth r3, glob at toc@l(r5)
+; CHECK-NEXT:    sth r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp sle i16 %a, %b

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesllltui.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesllltui.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesllltui.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesllltui.ll Fri Nov 16 11:24:23 2018
@@ -1,7 +1,7 @@
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
-; RUN: llc --relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
 

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesllnesll.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesllnesll.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesllnesll.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesllnesll.ll Fri Nov 16 11:24:23 2018
@@ -61,11 +61,12 @@ entry:
 define void @test_llnesll_store(i64 %a, i64 %b) {
 ; CHECK-LABEL: test_llnesll_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
-; CHECK-NEXT:    addic r4, r3, -1
-; CHECK-NEXT:    subfe r3, r4, r3
-; CHECK-NEXT:    std r3, glob at toc@l(r5)
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
+; CHECK-NEXT:    addic r5, r3, -1
+; CHECK-NEXT:    subfe r3, r5, r3
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i64 %a, %b
@@ -77,11 +78,12 @@ entry:
 define void @test_llnesll_sext_store(i64 %a, i64 %b) {
 ; CHECK-LABEL: test_llnesll_sext_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    subfic r3, r3, 0
 ; CHECK-NEXT:    subfe r3, r3, r3
-; CHECK-NEXT:    std r3, glob at toc@l(r5)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i64 %a, %b
@@ -93,10 +95,11 @@ entry:
 define void @test_llnesll_z_store(i64 %a) {
 ; CHECK-LABEL: test_llnesll_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    addic r5, r3, -1
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    subfe r3, r5, r3
-; CHECK-NEXT:    std r3, glob at toc@l(r4)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i64 %a, 0
@@ -108,10 +111,11 @@ entry:
 define void @test_llnesll_sext_z_store(i64 %a) {
 ; CHECK-LABEL: test_llnesll_sext_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    subfic r3, r3, 0
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    subfe r3, r3, r3
-; CHECK-NEXT:    std r3, glob at toc@l(r4)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i64 %a, 0

Modified: llvm/trunk/test/CodeGen/PowerPC/testComparesllneull.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/testComparesllneull.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/testComparesllneull.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/testComparesllneull.ll Fri Nov 16 11:24:23 2018
@@ -61,11 +61,12 @@ entry:
 define void @test_llneull_store(i64 %a, i64 %b) {
 ; CHECK-LABEL: test_llneull_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
-; CHECK-NEXT:    addic r4, r3, -1
-; CHECK-NEXT:    subfe r3, r4, r3
-; CHECK-NEXT:    std r3, glob at toc@l(r5)
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
+; CHECK-NEXT:    addic r5, r3, -1
+; CHECK-NEXT:    subfe r3, r5, r3
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i64 %a, %b
@@ -77,11 +78,12 @@ entry:
 define void @test_llneull_sext_store(i64 %a, i64 %b) {
 ; CHECK-LABEL: test_llneull_sext_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r5, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    xor r3, r3, r4
-; CHECK-NEXT:    addis r5, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r5)
 ; CHECK-NEXT:    subfic r3, r3, 0
 ; CHECK-NEXT:    subfe r3, r3, r3
-; CHECK-NEXT:    std r3, glob at toc@l(r5)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i64 %a, %b
@@ -93,10 +95,11 @@ entry:
 define void @test_llneull_z_store(i64 %a) {
 ; CHECK-LABEL: test_llneull_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    addic r5, r3, -1
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    subfe r3, r5, r3
-; CHECK-NEXT:    std r3, glob at toc@l(r4)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i64 %a, 0
@@ -108,10 +111,11 @@ entry:
 define void @test_llneull_sext_z_store(i64 %a) {
 ; CHECK-LABEL: test_llneull_sext_z_store:
 ; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    addis r4, r2, .LC0 at toc@ha
 ; CHECK-NEXT:    subfic r3, r3, 0
-; CHECK-NEXT:    addis r4, r2, glob at toc@ha
+; CHECK-NEXT:    ld r4, .LC0 at toc@l(r4)
 ; CHECK-NEXT:    subfe r3, r3, r3
-; CHECK-NEXT:    std r3, glob at toc@l(r4)
+; CHECK-NEXT:    std r3, 0(r4)
 ; CHECK-NEXT:    blr
 entry:
   %cmp = icmp ne i64 %a, 0

Modified: llvm/trunk/test/CodeGen/PowerPC/toc-float.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/toc-float.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/toc-float.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/toc-float.ll Fri Nov 16 11:24:23 2018
@@ -1,5 +1,5 @@
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr9 <%s | FileCheck -check-prefix=CHECK-P9 %s
-; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr8 <%s | FileCheck -check-prefix=CHECK-P8 %s
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr9 <%s | FileCheck -check-prefix=CHECK-P9 %s
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr8 <%s | FileCheck -check-prefix=CHECK-P8 %s
 
 ; As the constant could be represented as float, a float is
 ; loaded from constant pool.

Modified: llvm/trunk/test/CodeGen/PowerPC/vsx_scalar_ld_st.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/vsx_scalar_ld_st.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/vsx_scalar_ld_st.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/vsx_scalar_ld_st.ll Fri Nov 16 11:24:23 2018
@@ -1,6 +1,6 @@
-; RUN: llc -relocation-model=pic -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu \
 ; RUN:   -mcpu=pwr8 -mattr=-direct-move | FileCheck %s
-; RUN: llc -relocation-model=pic -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-linux-gnu \
 ; RUN:   -mcpu=pwr8 -mattr=-direct-move | FileCheck %s
 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-linux-gnu \
 ; RUN:   -mcpu=pwr9 -mattr=-direct-move | FileCheck %s -check-prefix=CHECK-P9

Modified: llvm/trunk/test/CodeGen/PowerPC/xray-tail-call-sled.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/xray-tail-call-sled.ll?rev=347076&r1=347075&r2=347076&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/xray-tail-call-sled.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/xray-tail-call-sled.ll Fri Nov 16 11:24:23 2018
@@ -1,4 +1,4 @@
-; RUN: llc -filetype=asm -relocation-model=pic -o - -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s
+; RUN: llc -filetype=asm -o - -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s
 
 define i32 @callee() nounwind noinline uwtable "function-instrument"="xray-always" {
 ; CHECK-LABEL: .Ltmp0:




More information about the llvm-commits mailing list