• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -mtriple=powerpc-unknown-linux-gnu -relocation-model=pic | FileCheck -check-prefix=SMALL-BSS %s
2@bar = common global i32 0, align 4
3
4declare i32 @call_foo(i32, ...)
5
6define i32 @foo() {
7entry:
8  %0 = load i32, i32* @bar, align 4
9  %call = call i32 (i32, ...) @call_foo(i32 %0, i32 0, i32 1, i32 2, i32 4, i32 8, i32 16, i32 32, i32 64)
10  ret i32 0
11}
12
13!llvm.module.flags = !{!0}
14!0 = !{i32 1, !"PIC Level", i32 1}
15; SMALL-BSS-LABEL:foo:
16; SMALL-BSS:         stw 30, -8(1)
17; SMALL-BSS:         stwu 1, -32(1)
18; SMALL-BSS:         bl _GLOBAL_OFFSET_TABLE_@local-4
19; SMALL-BSS:         mflr 30
20; SMALL-BSS-DAG:     stw {{[0-9]+}}, 8(1)
21; SMALL-BSS-DAG:     lwz [[VREG:[0-9]+]], bar@GOT(30)
22; SMALL-BSS-DAG:     lwz {{[0-9]+}}, 0([[VREG]])
23; SMALL-BSS:         bl call_foo@PLT
24; SMALL-BSS:         lwz 30, -8(1)
25