1; RUN: llc -march=lanai < %s | FileCheck %s 2; RUN: llc -march=lanai < %s -code-model=small | FileCheck -check-prefix CHECK-SMALL %s 3 4@data = external global [0 x i32] ; <[0 x i32]*> [#uses=5] 5 6define i32 @foo() nounwind readonly { 7entry: 8; CHECK-SMALL-LABEL: foo: 9; CHECK-SMALL: ld [data], %rv 10; CHECK-LABEL: foo: 11; CHECK: mov hi(data), %r[[REGISTER:[0-9]+]] 12; CHECK: or %r[[REGISTER]], lo(data), %r[[REGISTER]] 13; CHECK: ld 0[%r[[REGISTER]]], %rv 14 %0 = load i32, i32* getelementptr ([0 x i32], [0 x i32]* @data, i64 0, i64 0), align 4 ; <i32> [#uses=1] 15 ret i32 %0 16} 17 18define i32 @foo1() nounwind readonly { 19entry: 20; CHECK-SMALL-LABEL: foo1: 21; CHECK-SMALL: mov data, %r[[REGISTER:[0-9]+]] 22; CHECK-SMALL: ld 40[%r[[REGISTER]]], %rv 23; CHECK-LABEL: foo1: 24; CHECK: mov hi(data), %r[[REGISTER:[0-9]+]] 25; CHECK: or %r[[REGISTER]], lo(data), %r[[REGISTER]] 26; CHECK: ld 40[%r[[REGISTER]]], %rv 27 %0 = load i32, i32* getelementptr ([0 x i32], [0 x i32]* @data, i32 0, i64 10), align 4 ; <i32> [#uses=1] 28 ret i32 %0 29} 30 31