76 lines · plain
1; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mattr=-altivec -mtriple powerpc-ibm-aix-xcoff \2; RUN: -code-model=small -stop-after=machine-cp < %s | FileCheck \3; RUN: --check-prefix=32SMALL-MIR %s4 5; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mattr=-altivec -mtriple powerpc-ibm-aix-xcoff \6; RUN: -code-model=large -stop-after=machine-cp < %s | FileCheck \7; RUN: --check-prefix=32LARGE-MIR %s8 9; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mattr=-altivec -mtriple powerpc64-ibm-aix-xcoff \10; RUN: -code-model=small -stop-after=machine-cp < %s | FileCheck \11; RUN: --check-prefix=64SMALL-MIR %s12 13; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mattr=-altivec -mtriple powerpc64-ibm-aix-xcoff \14; RUN: -code-model=large -stop-after=machine-cp < %s | FileCheck \15; RUN: --check-prefix=64LARGE-MIR %s16 17; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mattr=-altivec -mtriple powerpc-ibm-aix-xcoff \18; RUN: -code-model=small < %s | FileCheck --check-prefixes=32SMALL-ASM,SMALL-ASM %s19 20; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mattr=-altivec -mtriple powerpc-ibm-aix-xcoff \21; RUN: -code-model=large < %s | FileCheck --check-prefixes=32LARGE-ASM,LARGE-ASM %s22 23; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mattr=-altivec -mtriple powerpc64-ibm-aix-xcoff \24; RUN: -code-model=small < %s | FileCheck --check-prefixes=64SMALL-ASM,SMALL-ASM %s25 26; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mattr=-altivec -mtriple powerpc64-ibm-aix-xcoff \27; RUN: -code-model=large < %s | FileCheck --check-prefixes=64LARGE-ASM,LARGE-ASM %s28 29define void @foo() {30entry:31 %tmp = alloca i6432 br label %__here33 34__here:35 store i64 ptrtoint (ptr blockaddress(@foo, %__here) to i64), ptr %tmp36 ret void37}38 39; 32SMALL-MIR: renamable $r[[REG1:[0-9]+]] = LWZtoc blockaddress(@foo, %ir-block.__here), $r2 :: (load (s32) from got)40 41; 32LARGE-MIR: renamable $r[[REG1:[0-9]+]] = ADDIStocHA $r2, blockaddress(@foo, %ir-block.__here)42; 32LARGE-MIR: renamable $r[[REG2:[0-9]+]] = LWZtocL blockaddress(@foo, %ir-block.__here), killed renamable $r[[REG1]], implicit $r2 :: (load (s32) from got)43 44; 64SMALL-MIR: renamable $x[[REG1:[0-9]+]] = LDtocBA blockaddress(@foo, %ir-block.__here), $x2 :: (load (s64) from got)45 46; 64LARGE-MIR: renamable $x[[REG1:[0-9]+]] = ADDIStocHA8 $x2, blockaddress(@foo, %ir-block.__here)47; 64LARGE-MIR: renamable $x[[REG2:[0-9]+]] = LDtocL blockaddress(@foo, %ir-block.__here), killed renamable $x[[REG1]], implicit $x2 :: (load (s64) from got)48 49; 32SMALL-ASM-LABEL: foo50; 32SMALL-ASM: .foo:51; 32SMALL-ASM: L..tmp0:52; 32SMALL-ASM: lwz [[REG1:[0-9]+]], L..C0(2)53 54; 32LARGE-ASM-LABEL: foo55; 32LARGE-ASM: .foo:56; 32LARGE-ASM: L..tmp0:57; 32LARGE-ASM: addis [[REG1:[0-9]+]], L..C0@u(2)58; 32LARGE-ASM: lwz [[REG2:[0-9]+]], L..C0@l([[REG1]])59 60; 64SMALL-ASM-LABEL: foo61; 64SMALL-ASM: .foo:62; 64SMALL-ASM: L..tmp0:63; 64SMALL-ASM: ld [[REG1:[0-9]+]], L..C0(2)64 65; 64LARGE-ASM-LABEL: foo66; 64LARGE-ASM: .foo:67; 64LARGE-ASM: L..tmp0:68; 64LARGE-ASM: addis [[REG1:[0-9]+]], L..C0@u(2)69; 64LARGE-ASM: ld [[REG2:[0-9]+]], L..C0@l([[REG1]])70 71; SMALL-ASM: .toc72; SMALL-ASM: .tc L..tmp0[TC],L..tmp073 74; LARGE-ASM: .toc75; LARGE-ASM: .tc L..tmp0[TE],L..tmp076