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 %s
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 %s
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 %s
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 %s
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 %s
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 %s
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 %s
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 %s
29 define float @test_float() {
31 ret float 5.500000e+00
34 ; 32SMALL-MIR: renamable $r[[REG1:[0-9]+]] = LWZtoc %const.0, $r2 :: (load (s32) from got)
35 ; 32SMALL-MIR: renamable $f[[REG2:[0-9]+]] = LFS 0, killed renamable $r[[REG1]] :: (load (s32) from constant-pool)
37 ; 32LARGE-MIR: renamable $r[[REG1:[0-9]+]] = ADDIStocHA $r2, %const.0
38 ; 32LARGE-MIR: renamable $r[[REG2:[0-9]+]] = LWZtocL %const.0, killed renamable $r[[REG1]], implicit $r2 :: (load (s32) from got)
39 ; 32LARGE-MIR: renamable $f[[REG3:[0-9]+]] = LFS 0, killed renamable $r[[REG2]] :: (load (s32) from constant-pool)
41 ; 64SMALL-MIR: renamable $x[[REG1:[0-9]+]] = LDtocCPT %const.0, $x2 :: (load (s64) from got)
42 ; 64SMALL-MIR: renamable $f[[REG2:[0-9]+]] = LFS 0, killed renamable $x[[REG1]] :: (load (s32) from constant-pool)
44 ; 64LARGE-MIR: renamable $x[[REG1:[0-9]+]] = ADDIStocHA8 $x2, %const.0
45 ; 64LARGE-MIR: renamable $x[[REG2:[0-9]+]] = LDtocL %const.0, killed renamable $x[[REG1]], implicit $x2 :: (load (s64) from got)
46 ; 64LARGE-MIR: renamable $f[[REG3:[0-9]+]] = LFS 0, killed renamable $x[[REG2]] :: (load (s32) from constant-pool)
48 ; 32SMALL-ASM: .csect .rodata[RO],2
49 ; 32SMALL-ASM: .align 2
50 ; 32SMALL-ASM: L..CPI0_0:
51 ; 32SMALL-ASM: .vbyte 4, 0x40b00000
52 ; 32SMALL-ASM: .test_float:
53 ; 32SMALL-ASM: lwz [[REG1:[0-9]+]], L..C0(2)
54 ; 32SMALL-ASM: lfs 1, 0([[REG1]])
57 ; 32LARGE-ASM: .csect .rodata[RO],2
58 ; 32LARGE-ASM: .align 2
59 ; 32LARGE-ASM: L..CPI0_0:
60 ; 32LARGE-ASM: .vbyte 4, 0x40b00000
61 ; 32LARGE-ASM: .test_float:
62 ; 32LARGE-ASM: addis [[REG1:[0-9]+]], L..C0@u(2)
63 ; 32LARGE-ASM: lwz [[REG2:[0-9]+]], L..C0@l([[REG1]])
64 ; 32LARGE-ASM: lfs 1, 0([[REG2]])
67 ; 64SMALL-ASM: .csect .rodata[RO],2
68 ; 64SMALL-ASM: .align 2
69 ; 64SMALL-ASM: L..CPI0_0:
70 ; 64SMALL-ASM: .vbyte 4, 0x40b00000
71 ; 64SMALL-ASM: .test_float:
72 ; 64SMALL-ASM: ld [[REG1:[0-9]+]], L..C0(2)
73 ; 64SMALL-ASM: lfs 1, 0([[REG1]])
76 ; 64LARGE-ASM: .csect .rodata[RO],2
77 ; 64LARGE-ASM: .align 2
78 ; 64LARGE-ASM: L..CPI0_0:
79 ; 64LARGE-ASM: .vbyte 4, 0x40b00000
80 ; 64LARGE-ASM: .test_float:
81 ; 64LARGE-ASM: addis [[REG1:[0-9]+]], L..C0@u(2)
82 ; 64LARGE-ASM: ld [[REG2:[0-9]+]], L..C0@l([[REG1]])
83 ; 64LARGE-ASM: lfs 1, 0([[REG2]])
87 ; SMALL-ASM: .tc L..CPI0_0[TC],L..CPI0_0
90 ; LARGE-ASM: .tc L..CPI0_0[TE],L..CPI0_0