summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Mips/mips-shf-gprel.ll
blob: 8b5fbaa939e70747ddeee19fa2cbbe52892a59a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
; Check that .sdata section has SHF_MIPS_GPREL flag.

; RUN: llc -mips-ssection-threshold=16 -mgpopt -mattr=noabicalls \
; RUN:     -relocation-model=static -march=mips -o - %s -filetype=obj \
; RUN:   | llvm-readobj -s | FileCheck %s

@data1 = global [4 x i32] [i32 1, i32 2, i32 3, i32 4], align 4
@date2 = global [4 x i32] zeroinitializer, align 4

; CHECK:      Name: .sdata
; CHECK-NEXT: Type: SHT_PROGBITS
; CHECK-NEXT: Flags [ (0x10000003)
; CHECK-NEXT:   SHF_ALLOC
; CHECK-NEXT:   SHF_MIPS_GPREL
; CHECK-NEXT:   SHF_WRITE
; CHECK-NEXT: ]

; CHECK:      Name: .sbss
; CHECK-NEXT: Type: SHT_NOBITS
; CHECK-NEXT: Flags [ (0x10000003)
; CHECK-NEXT:   SHF_ALLOC
; CHECK-NEXT:   SHF_MIPS_GPREL
; CHECK-NEXT:   SHF_WRITE
; CHECK-NEXT: ]
OpenPOWER on IntegriCloud