[PATCH] D102925: [RISCV] Add wrong arch attribute objfile test.
Zakk Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 21 09:00:33 PDT 2021
khchen created this revision.
khchen added reviewers: craig.topper, jrtc27, HsiangKai, asb.
Herald added subscribers: vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar.
khchen requested review of this revision.
Herald added subscribers: llvm-commits, MaskRay.
Herald added a project: LLVM.
arch string should depend on function attribute
in IR target-feature if missing -mattr option.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D102925
Files:
llvm/test/CodeGen/RISCV/subtarget-features-obj-bug.ll
Index: llvm/test/CodeGen/RISCV/subtarget-features-obj-bug.ll
===================================================================
--- /dev/null
+++ 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"}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102925.347051.patch
Type: text/x-patch
Size: 565 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210521/22d8f4cf/attachment.bin>
More information about the llvm-commits
mailing list