[PATCH] D120130: [RISCV] Fix zfinx test error in rust
Shao-Ce SUN via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 18 06:47:35 PST 2022
achieveartificialintelligence created this revision.
achieveartificialintelligence added a reviewer: krasimir.
Herald added subscribers: VincentWu, luke957, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, kito-cheng, niosHD, sabuasal, JDevlieghere, simoncook, johnrusso, rbar, asb, hiraditya.
achieveartificialintelligence requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.
In D93298 <https://reviews.llvm.org/D93298>: It appears that this is causing an assertion segfault in a rustc test over at our experimental rust + llvm at head bot:
https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/8430#167e6de5-2dd5-41c3-87d7-b6e3f3908371/262-706
The test is https://github.com/rust-lang/rust/blob/master/src/test/assembly/asm/riscv-types.rs
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D120130
Files:
llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
Index: llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
===================================================================
--- llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
+++ llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
@@ -270,13 +270,17 @@
unsigned NF = 1;
RISCVII::VLMUL LMul = RISCVII::LMUL_1;
unsigned SubRegIdx = RISCV::sub_vrm1_0;
- if (RISCV::FPR16RegClass.contains(DstReg, SrcReg)) {
+ if (RISCV::FPR16RegClass.contains(DstReg, SrcReg) ||
+ RISCV::GPRF16RegClass.contains(DstReg, SrcReg)) {
Opc = RISCV::FSGNJ_H;
IsScalableVector = false;
- } else if (RISCV::FPR32RegClass.contains(DstReg, SrcReg)) {
+ } else if (RISCV::FPR32RegClass.contains(DstReg, SrcReg) ||
+ RISCV::GPRF32RegClass.contains(DstReg, SrcReg)) {
Opc = RISCV::FSGNJ_S;
IsScalableVector = false;
- } else if (RISCV::FPR64RegClass.contains(DstReg, SrcReg)) {
+ } else if (RISCV::FPR64RegClass.contains(DstReg, SrcReg) ||
+ RISCV::GPRF64RegClass.contains(DstReg, SrcReg) ||
+ RISCV::GPRPF64RegClass.contains(DstReg, SrcReg)) {
Opc = RISCV::FSGNJ_D;
IsScalableVector = false;
} else if (RISCV::VRRegClass.contains(DstReg, SrcReg)) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120130.409924.patch
Type: text/x-patch
Size: 1181 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220218/0c41b67f/attachment.bin>
More information about the llvm-commits
mailing list