diff options
Diffstat (limited to 'llvm/test/CodeGen/PowerPC/aix-lower-block-address.ll')
| -rw-r--r-- | llvm/test/CodeGen/PowerPC/aix-lower-block-address.ll | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/PowerPC/aix-lower-block-address.ll b/llvm/test/CodeGen/PowerPC/aix-lower-block-address.ll index 24ea946bacb..2d6353876a3 100644 --- a/llvm/test/CodeGen/PowerPC/aix-lower-block-address.ll +++ b/llvm/test/CodeGen/PowerPC/aix-lower-block-address.ll @@ -14,6 +14,18 @@ ; RUN: -code-model=large -stop-after=machine-cp < %s | FileCheck \ ; RUN: --check-prefix=64LARGE-MIR %s +; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mtriple powerpc-ibm-aix-xcoff \ +; RUN: -code-model=small < %s | FileCheck --check-prefixes=32SMALL-ASM,CHECK %s + +; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mtriple powerpc-ibm-aix-xcoff \ +; RUN: -code-model=large < %s | FileCheck --check-prefixes=32LARGE-ASM,CHECK %s + +; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mtriple powerpc64-ibm-aix-xcoff \ +; RUN: -code-model=small < %s | FileCheck --check-prefixes=64SMALL-ASM,CHECK %s + +; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mtriple powerpc64-ibm-aix-xcoff \ +; RUN: -code-model=large < %s | FileCheck --check-prefixes=64LARGE-ASM,CHECK %s + define void @foo() { entry: %tmp = alloca i64 @@ -33,3 +45,28 @@ __here: ; 64LARGE-MIR: renamable $x[[REG1:[0-9]+]] = ADDIStocHA8 $x2, blockaddress(@foo, %ir-block.__here) ; 64LARGE-MIR: renamable $x[[REG2:[0-9]+]] = LDtocL blockaddress(@foo, %ir-block.__here), killed renamable $x[[REG1]], implicit $x2 :: (load 8 from got) + +; 32SMALL-ASM-LABEL: foo +; 32SMALL-ASM: .foo: +; 32SMALL-ASM: Ltmp0: +; 32SMALL-ASM: lwz [[REG1:[0-9]+]], LC0(2) + +; 32LARGE-ASM-LABEL: foo +; 32LARGE-ASM: .foo: +; 32LARGE-ASM: Ltmp0: +; 32LARGE-ASM: addis [[REG1:[0-9]+]], LC0@u(2) +; 32LARGE-ASM: lwz [[REG2:[0-9]+]], LC0@l([[REG1]]) + +; 64SMALL-ASM-LABEL: foo +; 64SMALL-ASM: .foo: +; 64SMALL-ASM: Ltmp0: +; 64SMALL-ASM: ld [[REG1:[0-9]+]], LC0(2) + +; 64LARGE-ASM-LABEL: foo +; 64LARGE-ASM: .foo: +; 64LARGE-ASM: Ltmp0: +; 64LARGE-ASM: addis [[REG1:[0-9]+]], LC0@u(2) +; 64LARGE-ASM: ld [[REG2:[0-9]+]], LC0@l([[REG1]]) + +; CHECK: .toc +; CHECK-NOT: .tc |

