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
4
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
8
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
12
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
16
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
19
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
22
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
25
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
28
29define float @test_float() {
30entry:
31  ret float 5.500000e+00
32}
33
34; 32SMALL-MIR: renamable $r[[REG1:[0-9]+]] = LWZtoc %const.0, $r2 :: (load 4 from got)
35; 32SMALL-MIR: renamable $f[[REG2:[0-9]+]] = LFS 0, killed renamable $r[[REG1]] :: (load 4 from constant-pool)
36
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 4 from got)
39; 32LARGE-MIR: renamable $f[[REG3:[0-9]+]] = LFS 0, killed renamable $r[[REG2]] :: (load 4 from constant-pool)
40
41; 64SMALL-MIR: renamable $x[[REG1:[0-9]+]] = LDtocCPT %const.0, $x2 :: (load 8 from got)
42; 64SMALL-MIR: renamable $f[[REG2:[0-9]+]] = LFS 0, killed renamable $x[[REG1]] :: (load 4 from constant-pool)
43
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 8 from got)
46; 64LARGE-MIR: renamable $f[[REG3:[0-9]+]] = LFS 0, killed renamable $x[[REG2]] :: (load 4 from constant-pool)
47
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]])
55; 32SMALL-ASM:         blr
56
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]])
65; 32LARGE-ASM:         blr
66
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]])
74; 64SMALL-ASM:         blr
75
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]])
84; 64LARGE-ASM:         blr
85
86; SMALL-ASM: .toc
87; SMALL-ASM: .tc L..CPI0_0[TC],L..CPI0_0
88
89; LARGE-ASM: .toc
90; LARGE-ASM: .tc L..CPI0_0[TE],L..CPI0_0
91