1 ; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mtriple powerpc-ibm-aix-xcoff \
2 ; RUN: -code-model=small < %s | FileCheck %s --check-prefixes=CHECK,SMALL
4 ; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mtriple powerpc-ibm-aix-xcoff \
5 ; RUN: -code-model=large < %s | FileCheck %s --check-prefixes=CHECK,LARGE
7 @a = common global i32 0
9 define i32 @test_load() {
11 %0 = load i32, i32* @a
15 ; SMALL-LABEL: .test_load:{{$}}
16 ; SMALL: lwz [[REG1:[0-9]+]], LC0(2)
17 ; SMALL: lwz [[REG2:[0-9]+]], 0([[REG1]])
20 ; LARGE-LABEL: .test_load:{{$}}
21 ; LARGE: addis [[REG1:[0-9]+]], LC0@u(2)
22 ; LARGE: lwz [[REG2:[0-9]+]], LC0@l([[REG1]])
23 ; LARGE: lwz [[REG3:[0-9]+]], 0([[REG2]])
26 @b = common global i32 0
28 define void @test_store(i32 %0) {
33 ; SMALL-LABEL: .test_store:{{$}}
34 ; SMALL: lwz [[REG1:[0-9]+]], LC1(2)
35 ; SMALL: stw [[REG2:[0-9]+]], 0([[REG1]])
38 ; LARGE-LABEL: .test_store:{{$}}
39 ; LARGE: addis [[REG1:[0-9]+]], LC1@u(2)
40 ; LARGE: lwz [[REG2:[0-9]+]], LC1@l([[REG1]])
41 ; LARGE: stw [[REG3:[0-9]+]], 0([[REG2]])
44 ; TODO Update test when TOC-entry emission lands.