[PATCH] D129360: [RISCV] Increase complexity of RVV element extraction patterns
Wang Pengcheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 8 03:51:59 PDT 2022
pcwang-thead created this revision.
pcwang-thead added reviewers: jacquesguan, StephenFan, craig.topper.
Herald added subscribers: sunshaoce, 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, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya, arichardson.
Herald added a project: All.
pcwang-thead requested review of this revision.
Herald added subscribers: llvm-commits, eopXD, MaskRay.
Herald added a project: LLVM.
Somehow some tests failed in our downstream because it matched
VFMV+FSD pattern first. Both FSD and VSE patterns have the same
complexity, while FSD is matched before VSE in the generated
matcher table.
This problem only occurs in our downstream (so sorry that I can't
provide a test here) and increasing the value of `AddedComplexity`
can fix it.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D129360
Files:
llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td
Index: llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td
===================================================================
--- llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td
+++ llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td
@@ -1039,7 +1039,7 @@
// Fold store of vmv.f.s to a vse with VL=1.
defvar store_instr = !cast<Instruction>("PseudoVSE"#vti.SEW#"_V_"#vti.LMul.MX);
- let AddedComplexity = 1 in {
+ let AddedComplexity = 2 in {
// Add complexity to increase the priority of this pattern being matched.
def : Pat<(store (vti.Scalar (int_riscv_vfmv_f_s (vti.Vector vti.RegClass:$rs2))), GPR:$rs1),
(store_instr vti.RegClass:$rs2, GPR:$rs1, 1, vti.Log2SEW)>;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129360.443196.patch
Type: text/x-patch
Size: 702 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220708/1a98ee90/attachment.bin>
More information about the llvm-commits
mailing list