diff --git a/llvm/test/CodeGen/RISCV/subtarget-features-obj-bug.ll b/llvm/test/CodeGen/RISCV/subtarget-features-obj-bug.ll new file mode 100644 --- /dev/null +++ b/llvm/test/CodeGen/RISCV/subtarget-features-obj-bug.ll @@ -0,0 +1,14 @@ +; RUN: llc --filetype=obj -o - < %s | llvm-readelf -A - \ +; RUN: | FileCheck %s + +; CHECK: TagName: arch +; CHECK: Value: rv64i2p0 + +target triple = "riscv64-unknown-linux-gnu" + +define float @foo1(i32 %a) nounwind #0 { + %conv = sitofp i32 %a to float + ret float %conv +} + +attributes #0 = { "target-features"="+64bit,+a,+c,+d,+f,+m"}