Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1060,27 +1060,27 @@ MCSection *TargetLoweringObjectFileELF::getSectionForConstant(

auto &Context = getContext();
if (Kind.isMergeableConst4() && MergeableConst4Section)
return Context.getELFSection(".rodata.cst4." + SectionSuffix,
return Context.getELFSection(".rodata.cst4." + SectionSuffix + ".",
ELF::SHT_PROGBITS,
ELF::SHF_ALLOC | ELF::SHF_MERGE, 4);
if (Kind.isMergeableConst8() && MergeableConst8Section)
return Context.getELFSection(".rodata.cst8." + SectionSuffix,
return Context.getELFSection(".rodata.cst8." + SectionSuffix + ".",
ELF::SHT_PROGBITS,
ELF::SHF_ALLOC | ELF::SHF_MERGE, 8);
if (Kind.isMergeableConst16() && MergeableConst16Section)
return Context.getELFSection(".rodata.cst16." + SectionSuffix,
return Context.getELFSection(".rodata.cst16." + SectionSuffix + ".",
ELF::SHT_PROGBITS,
ELF::SHF_ALLOC | ELF::SHF_MERGE, 16);
if (Kind.isMergeableConst32() && MergeableConst32Section)
return Context.getELFSection(".rodata.cst32." + SectionSuffix,
return Context.getELFSection(".rodata.cst32." + SectionSuffix + ".",
ELF::SHT_PROGBITS,
ELF::SHF_ALLOC | ELF::SHF_MERGE, 32);
if (Kind.isReadOnly())
return Context.getELFSection(".rodata." + SectionSuffix, ELF::SHT_PROGBITS,
ELF::SHF_ALLOC);
return Context.getELFSection(".rodata." + SectionSuffix + ".",
ELF::SHT_PROGBITS, ELF::SHF_ALLOC);

assert(Kind.isReadOnlyWithRel() && "Unknown section kind");
return Context.getELFSection(".data.rel.ro." + SectionSuffix,
return Context.getELFSection(".data.rel.ro." + SectionSuffix + ".",
ELF::SHT_PROGBITS,
ELF::SHF_ALLOC | ELF::SHF_WRITE);
}
Expand Down
10 changes: 5 additions & 5 deletions llvm/test/CodeGen/AArch64/constant-pool-partition.ll
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
; function, constant pools for this constant should not have `.unlikely` suffix.

;; Constant pools for function @cold_func.
; CHECK: .section .rodata.cst8.hot,"aM",@progbits,8
; CHECK: .section .rodata.cst8.hot.,"aM",@progbits,8
; CHECK-NEXT: .p2align
; CHECK-NEXT: .LCPI0_0:
; CHECK-NEXT: .xword 0x3fe5c28f5c28f5c3 // double 0.68000000000000005
; CHECK-NEXT: .section .rodata.cst8.unlikely,"aM",@progbits,8
; CHECK-NEXT: .section .rodata.cst8.unlikely.,"aM",@progbits,8
; CHECK-NEXT: .p2align
; CHECK-NEXT: .LCPI0_1:
; CHECK-NEXT: .xword 0x3fe5eb851eb851ec // double 0.68500000000000005
Expand Down Expand Up @@ -58,7 +58,7 @@
; CHECK-NEXT: .word 3 // 0x3
; CHECK-NEXT: .word 5 // 0x5
; CHECK-NEXT: .word 7 // 0x7
; CHECK-NEXT: .section .rodata.cst16.hot,"aM",@progbits,16
; CHECK-NEXT: .section .rodata.cst16.hot.,"aM",@progbits,16
; CHECK-NEXT: .p2align
; CHECK-NEXT: .LCPI1_2:
; CHECK-NEXT: .word 442 // 0x1ba
Expand All @@ -67,11 +67,11 @@
; CHECK-NEXT: .word 0 // 0x0

;; Constant pools for function @hot_func
; CHECK: .section .rodata.cst8.hot,"aM",@progbits,8
; CHECK: .section .rodata.cst8.hot.,"aM",@progbits,8
; CHECK-NEXT: .p2align
; CHECK-NEXT: .LCPI2_0:
; CHECK-NEXT: .xword 0x3fe5c28f5c28f5c3 // double 0.68000000000000005
; CHECK-NEXT: .section .rodata.cst16.hot,"aM",@progbits,16
; CHECK-NEXT: .section .rodata.cst16.hot.,"aM",@progbits,16
; CHECK-NEXT: .p2align
; CHECK-NEXT: .LCPI2_1:
; CHECK-NEXT: .word 0 // 0x0
Expand Down
8 changes: 4 additions & 4 deletions llvm/test/CodeGen/X86/constant-pool-partition.ll
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ target triple = "x86_64-grtev4-linux-gnu"
; RUN: %s -o - 2>&1 | FileCheck %s --dump-input=always

;; For function @cold_func
; CHECK: .section .rodata.cst8.hot,"aM",@progbits,8
; CHECK: .section .rodata.cst8.hot.,"aM",@progbits,8
; CHECK-NEXT: .p2align
; CHECK-NEXT: .LCPI0_0:
; CHECK-NEXT: .quad 0x3fe5c28f5c28f5c3 # double 0.68000000000000005
; CHECK-NEXT: .section .rodata.cst8.unlikely,"aM",@progbits,8
; CHECK-NEXT: .section .rodata.cst8.unlikely.,"aM",@progbits,8
; CHECK-NEXT: .p2align
; CHECK-NEXT: .LCPI0_1:
; CHECK-NEXT: .quad 0x3eb0000000000000 # double 9.5367431640625E-7
Expand All @@ -50,11 +50,11 @@ target triple = "x86_64-grtev4-linux-gnu"
; CHECK-NEXT: .long 0x3e000000 # float 0.125

;; For function @hot_func
; CHECK: .section .rodata.cst8.hot,"aM",@progbits,8
; CHECK: .section .rodata.cst8.hot.,"aM",@progbits,8
; CHECK-NEXT: .p2align
; CHECK-NEXT: .LCPI3_0:
; CHECK-NEXT: .quad 0x3fe5c28f5c28f5c3 # double 0.68000000000000005
; CHECK-NEXT: .section .rodata.cst16.hot,"aM",@progbits,16
; CHECK-NEXT: .section .rodata.cst16.hot.,"aM",@progbits,16
; CHECK-NEXT: .p2align
; CHECK-NEXT: .LCPI3_1:
; CHECK-NEXT: .long 2147483648 # 0x80000000
Expand Down