• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: llc -relocation-model=pic -start-after=block-placement -o - %s | FileCheck %s
2
3--- |
4  target datalayout = "E-m:e-i64:64-n32:64"
5  target triple = "powerpc64-unknown-linux-gnu"
6
7  @x = internal thread_local unnamed_addr global i1 false
8  @y = external thread_local global i32, align 4
9
10  ; Function Attrs: nounwind
11  define void @test1() #0 {
12  entry:
13    store i1 true, i1* @x, align 1
14    store i32 20, i32* @y, align 4
15    ret void
16  }
17
18  attributes #0 = { nounwind "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "target-cpu"="pwr7" }
19
20  !llvm.module.flags = !{!0}
21
22  !0 = !{i32 1, !"PIC Level", i32 2}
23
24...
25---
26name:            test1
27alignment:       4
28exposesReturnsTwice: false
29hasInlineAsm:    false
30isSSA:           false
31tracksRegLiveness: true
32tracksSubRegLiveness: false
33frameInfo:
34  isFrameAddressTaken: false
35  isReturnAddressTaken: false
36  hasStackMap:     false
37  hasPatchPoint:   false
38  stackSize:       64
39  offsetAdjustment: 0
40  maxAlignment:    0
41  adjustsStack:    false
42  hasCalls:        false
43  maxCallFrameSize: 48
44  hasOpaqueSPAdjustment: false
45  hasVAStart:      false
46  hasMustTailInVarArgFunc: false
47fixedStack:
48  - { id: 0, type: spill-slot, offset: -16, size: 8, alignment: 16, callee-saved-register: '%x30' }
49  - { id: 1, offset: -8, size: 8, alignment: 8, isImmutable: true, isAliased: false }
50body:             |
51  bb.0.entry:
52    liveins: %x30, %x30
53
54    %x0 = MFLR8 implicit %lr8
55    STD %x31, -8, %x1
56    STD killed %x0, 16, %x1
57    %x1 = STDU %x1, -64, %x1
58    %x3 = ADDIStlsldHA %x2, @x
59    %x31 = OR8 %x1, %x1
60    %x3 = ADDItlsldL killed %x3, @x
61    STD killed %x30, 48, %x31 :: (store 8 into %fixed-stack.0, align 16)
62    %x3 = GETtlsldADDR killed %x3, @x, implicit-def dead %x0, implicit-def dead %x4, implicit-def dead %x5, implicit-def dead %x6, implicit-def dead %x7, implicit-def dead %x8, implicit-def dead %x9, implicit-def dead %x10, implicit-def dead %x11, implicit-def dead %x12, implicit-def %lr8, implicit-def %ctr8, implicit-def dead %cr0, implicit-def dead %cr1, implicit-def dead %cr5, implicit-def dead %cr6, implicit-def dead %cr7
63    %x12 = ADDIStlsgdHA %x2, @y
64    %x30 = OR8 killed %x3, %x3
65    %x3 = ADDItlsgdL killed %x12, @y
66    %x3 = GETtlsADDR killed %x3, @y, implicit-def dead %x0, implicit-def dead %x4, implicit-def dead %x5, implicit-def dead %x6, implicit-def dead %x7, implicit-def dead %x8, implicit-def dead %x9, implicit-def dead %x10, implicit-def dead %x11, implicit-def dead %x12, implicit-def %lr8, implicit-def %ctr8, implicit-def dead %cr0, implicit-def dead %cr1, implicit-def dead %cr5, implicit-def dead %cr6, implicit-def dead %cr7
67    %x4 = ADDISdtprelHA killed %x30, @x
68    ; CHECK: addis 4, 30, x@dtprel@ha
69    %x5 = LI8 1
70    %r6 = LI 20
71    %x30 = LD 48, %x31 :: (load 8 from %fixed-stack.0, align 16)
72    STB8 killed %x5, target-flags(ppc-dtprel-lo) @x, killed %x4 :: (store 1 into @x)
73    STW killed %r6, 0, killed %x3 :: (store 4 into @y)
74    %x1 = ADDI8 %x1, 64
75    %x0 = LD 16, %x1
76    %x31 = LD -8, %x1
77    MTLR8 killed %x0, implicit-def %lr8
78    BLR8 implicit %lr8, implicit %rm
79
80...
81