1 ; RUN: llc < %s -march=bpfel | FileCheck %s
3 define i16 @am1(i16* %a) nounwind {
8 ; CHECK: r0 = *(u16 *)(r1 + 0)
10 @foo = external global i16
12 define i16 @am2() nounwind {
13 %1 = load i16, i16* @foo
17 ; CHECK: r0 = *(u16 *)(r1 + 0)
19 define i16 @am4() nounwind {
20 %1 = load volatile i16, i16* inttoptr(i16 32 to i16*)
25 ; CHECK: r0 = *(u16 *)(r1 + 0)
27 define i16 @am5(i16* %a) nounwind {
28 %1 = getelementptr i16, i16* %a, i16 2
29 %2 = load i16, i16* %1
33 ; CHECK: r0 = *(u16 *)(r1 + 4)
35 %S = type { i16, i16 }
36 @baz = common global %S zeroinitializer, align 1
38 define i16 @am6() nounwind {
39 %1 = load i16, i16* getelementptr (%S, %S* @baz, i32 0, i32 1)
43 ; CHECK: r0 = *(u16 *)(r1 + 2)