Files
clang-p2996/llvm/test/CodeGen/RISCV/module-elf-flags.ll
Craig Topper 891172d9be [RISCV] Use 'riscv-isa' module flag to set ELF flags and attributes. (#85155)
Walk all the ISA strings and set the subtarget bits for any extension we
find in any string.

This allows LTO output to have a ELF attributes from the union of all of
the files used to compile it.
2024-03-20 11:35:19 -07:00

14 lines
294 B
LLVM

; RUN: llc -mtriple=riscv32 -filetype=obj < %s | llvm-readelf -h - | FileCheck -check-prefixes=FLAGS %s
; FLAGS: Flags: 0x11, RVC, TSO
define i32 @addi(i32 %a) {
%1 = add i32 %a, 1
ret i32 %1
}
!llvm.module.flags = !{!0}
!0 = !{i32 6, !"riscv-isa", !1}
!1 = !{!"rv64i2p1_c2p0_ztso0p1"}