1 ; RUN: llc -mtriple powerpc-ibm-aix-xcoff -code-model=small \
2 ; RUN: -stop-after=machine-cp -print-before=simple-register-coalescing 2>&1 < \
3 ; RUN: %s | FileCheck --check-prefix=SMALL %s
5 ; RUN: not llc -mtriple powerpc-ibm-aix-xcoff -code-model=medium \
6 ; RUN: -stop-after=machine-cp 2>&1 < %s | FileCheck --check-prefix=MEDIUM %s
8 ; RUN: llc -mtriple powerpc-ibm-aix-xcoff -code-model=large \
9 ; RUN: -stop-after=machine-cp -print-before=simple-register-coalescing 2>&1 < \
10 ; RUN: %s | FileCheck --check-prefix=LARGE %s
12 ; RUN: llc -mtriple powerpc-ibm-aix-xcoff -stop-after=machine-cp \
13 ; RUN: -print-before=simple-register-coalescing 2>&1 < %s | FileCheck \
14 ; RUN: --check-prefix=SMALL %s
16 @msg = common global i8* null, align 4
17 @ptr = common global i8* null, align 4
21 ; SMALL: %0:gprc_and_gprc_nor0 = LWZtoc @msg, $r2 :: (load 4 from got)
22 ; SMALL: %1:gprc = LWZ 0, %0:gprc_and_gprc_nor0 :: (dereferenceable load 4 from @msg)
23 ; SMALL: %2:gprc_and_gprc_nor0 = LWZtoc @ptr, $r2 :: (load 4 from got)
24 ; SMALL: STW %1:gprc, 0, %2:gprc_and_gprc_nor0 :: (store 4 into @ptr)
26 ; MEDIUM: Medium code model is not supported on AIX.
28 ; LARGE: %0:gprc_and_gprc_nor0 = ADDIStocHA $r2, @msg
29 ; LARGE: %1:gprc_and_gprc_nor0 = LWZtocL @msg, %0:gprc_and_gprc_nor0, implicit $r2 :: (load 4 from got)
30 ; LARGE: %2:gprc = LWZ 0, %1:gprc_and_gprc_nor0 :: (dereferenceable load 4 from @msg)
31 ; LARGE: %3:gprc_and_gprc_nor0 = ADDIStocHA $r2, @ptr
32 ; LARGE: %4:gprc_and_gprc_nor0 = LWZtocL @ptr, %3:gprc_and_gprc_nor0, implicit $r2 :: (load 4 from got)
33 ; LARGE: STW %2:gprc, 0, %4:gprc_and_gprc_nor0 :: (store 4 into @ptr)
35 %0 = load i8*, i8** @msg, align 4
36 store i8* %0, i8** @ptr, align 4