1 ; Test loads of symbolic addresses when generating small-model non-PIC.
2 ; All addresses can be treated as PC
4 ; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
6 @e4 = external global i32
8 @e2 = external global i32, align 2
9 @d2 = global i32 1, align 2
10 @e1 = external global i32, align 1
11 @d1 = global i32 1, align 1
18 declare void @foo(i32 *)
20 ; Test a load of a fully-aligned external variable.
28 ; Test a load of a fully-aligned local variable.
36 ; Test a load of a 2-byte-aligned external variable.
44 ; Test a load of a 2-byte-aligned local variable.
52 ; Test a load of an unaligned external variable, which must go via the GOT.
55 ; CHECK: lgrl %r2, e1@GOT
60 ; Test a load of an unaligned local variable, which must go via the GOT.
63 ; CHECK: lgrl %r2, d1@GOT
68 ; Test a load of an external function.
69 define void() *@f7() {
76 ; Test a load of a local function.
77 define void() *@f8() {
84 ; Test that LARL can be rematerialized.
88 ; CHECK: brasl %r14, foo@PLT
90 ; CHECK: brasl %r14, foo@PLT
92 call void @foo(i32 *@d2)
93 call void @foo(i32 *@d2)