1; RUN: llc -mtriple=riscv32 -data-sections < %s | FileCheck -check-prefix=RV32 %s 2; RUN: llc -mtriple=riscv64 -data-sections < %s | FileCheck -check-prefix=RV64 %s 3 4; Append an unique name to each sdata/sbss section when -data-section. 5 6@v = dso_local global i32 0, align 4 7@r = dso_local global i64 7, align 8 8 9; If a symbol has an explicit section name, we should honor it. 10@vv = dso_local global i32 0, section ".sbss", align 4 11@rr = dso_local global i64 7, section ".sdata", align 8 12@bb = dso_local global i32 0, section ".sbss_like", align 4 13@tt = dso_local global i64 7, section ".sdata_like", align 8 14@nn = dso_local global i32 0, section ".custom_a", align 4 15@yy = dso_local global i64 7, section ".custom_b", align 8 16 17; SmallDataLimit set to 8, so we expect @v will be put in sbss 18; and @r will be put in sdata. 19!llvm.module.flags = !{!0} 20!0 = !{i32 8, !"SmallDataLimit", i32 8} 21 22; RV32: .section .sbss.v,"aw" 23; RV32: .section .sdata.r,"aw" 24; RV32: .section .sbss,"aw" 25; RV32: .section .sdata,"aw" 26; RV32: .section .sbss_like,"aw" 27; RV32: .section .sdata_like,"aw" 28; RV32: .section .custom_a,"aw" 29; RV32: .section .custom_b,"aw" 30 31; RV64: .section .sbss.v,"aw" 32; RV64: .section .sdata.r,"aw" 33; RV64: .section .sbss,"aw" 34; RV64: .section .sdata,"aw" 35; RV64: .section .sbss_like,"aw" 36; RV64: .section .sdata_like,"aw" 37; RV64: .section .custom_a,"aw" 38; RV64: .section .custom_b,"aw" 39