1 ; RUN: llc < %s -march=bpfel | FileCheck %s
3 define i16 @am1(ptr %a) nounwind {
8 ; CHECK: r0 = *(u16 *)(r1 + 0)
10 @foo = external global i16
12 define i16 @am2() nounwind {
13 %1 = load i16, ptr @foo
17 ; CHECK: r0 = *(u16 *)(r1 + 0)
19 define i16 @am4() nounwind {
20 %1 = load volatile i16, ptr inttoptr(i16 32 to ptr)
25 ; CHECK: r0 = *(u16 *)(r1 + 0)
27 define i16 @am5(ptr %a) nounwind {
28 %1 = getelementptr i16, ptr %a, i16 2
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, ptr getelementptr (%S, ptr @baz, i32 0, i32 1)
43 ; CHECK: r0 = *(u16 *)(r1 + 2)