1 ; Test that a huge address offset is loaded into a register and then added
4 ; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
6 @a = common dso_local global i32 0, align 4
10 ; CHECK: llihl %r0, 829
11 ; CHECK: oilf %r0, 4294966308
15 ret i64 add (i64 ptrtoint (ptr @a to i64), i64 3564822854692)
18 define signext i32 @f2() {
20 ; CHECK: llihl %r0, 829
21 ; CHECK: oilf %r0, 4294966308
24 ; CHECK: lgf %r2, 0(%r1)
27 %0 = load i32, ptr inttoptr (i64 add (i64 ptrtoint (ptr @a to i64),
28 i64 3564822854692) to ptr)