diff options
author | Arthur Eubanks <aeubanks@google.com> | 2024-02-15 13:50:26 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-15 12:50:26 -0800 |
commit | 5b51d45f496f10a74dea5a100cf18b33b45493dc (patch) | |
tree | 82f06ef121232350bb30d9a32d294b841c4f5b0e /llvm/test | |
parent | d2c9a19dd8048801ef1d8238948c39ad4fcdcf95 (diff) | |
download | llvm-5b51d45f496f10a74dea5a100cf18b33b45493dc.zip llvm-5b51d45f496f10a74dea5a100cf18b33b45493dc.tar.gz llvm-5b51d45f496f10a74dea5a100cf18b33b45493dc.tar.bz2 |
[X86] Use ".lrodata" prefix for large mergeable constants (#81900)
Otherwise with a small enough large-data-threshold, we can get .rodata.*
sections marked large, making .rodata large in the final binary.
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/CodeGen/X86/code-model-elf-merge-sections.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/code-model-elf-merge-sections.ll b/llvm/test/CodeGen/X86/code-model-elf-merge-sections.ll new file mode 100644 index 0000000..f955f71 --- /dev/null +++ b/llvm/test/CodeGen/X86/code-model-elf-merge-sections.ll @@ -0,0 +1,16 @@ +; RUN: llc < %s -relocation-model=pic -filetype=obj -code-model=medium -large-data-threshold=0 -o %t +; RUN: llvm-readelf -S %t | FileCheck %s --check-prefix=LARGE +; RUN: llc < %s -relocation-model=pic -filetype=obj -code-model=medium -large-data-threshold=99 -o %t +; RUN: llvm-readelf -S %t | FileCheck %s --check-prefix=SMALL + +; LARGE: .lrodata.str4.4 {{.*}} AMSl +; LARGE: .lrodata.cst8 {{.*}} AMl + +; SMALL: .rodata.str4.4 {{.*}} AMS +; SMALL: .rodata.cst8 {{.*}} AM + +target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64--linux" + +@str = internal unnamed_addr constant [3 x i32] [i32 1, i32 2, i32 0] +@merge = internal unnamed_addr constant i64 2 |