Skip to content

Commit 52f0575

Browse files
author
Chen Zheng
committed
add test for large code model
1 parent 8efdc5d commit 52f0575

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

llvm/test/CodeGen/PowerPC/aix-tocdata-fastisel.ll

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
22
; RUN: llc < %s -mtriple=powerpc64-ibm-aix-xcoff -fast-isel -verify-machineinstrs \
33
; RUN: -code-model=small | FileCheck %s --check-prefix=SMALL
4-
5-
;; FIXME: when toc data for 64 big large code model is supported,
6-
;; add a run line for large code model too.
4+
; RUN: llc < %s -mtriple=powerpc64-ibm-aix-xcoff -fast-isel -verify-machineinstrs \
5+
; RUN: -code-model=large | FileCheck %s --check-prefix=LARGE
76

87
@a = global i32 0, align 4 #0
98

@@ -13,6 +12,13 @@ define signext i32 @foo() #1 {
1312
; SMALL-NEXT: la 3, a[TD](2)
1413
; SMALL-NEXT: lwa 3, 0(3)
1514
; SMALL-NEXT: blr
15+
;
16+
; LARGE-LABEL: foo:
17+
; LARGE: # %bb.0: # %entry
18+
; LARGE-NEXT: addis 3, a[TD]@u(2)
19+
; LARGE-NEXT: addi 3, 3, a[TD]@toc@l
20+
; LARGE-NEXT: lwa 3, 0(3)
21+
; LARGE-NEXT: blr
1622
entry:
1723
%0 = load i32, ptr @a, align 4
1824
ret i32 %0

0 commit comments

Comments
 (0)