[PATCH] D152222: [RISCV] Don't fold RISCVISD::VMV_V_X_VL series node and scalar load to vector load when scalar load is update load
Zixuan Wu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 6 00:16:00 PDT 2023
zixuan-wu updated this revision to Diff 528719.
zixuan-wu retitled this revision from "[RISCV] Fix the num of chain SDNode introduced in 9e0f9f113248093e737c4cf5450f0a3c2bcd90ba" to "[RISCV] Don't fold RISCVISD::VMV_V_X_VL series node and scalar load to vector load when scalar load is update load".
zixuan-wu edited the summary of this revision.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152222/new/
https://reviews.llvm.org/D152222
Files:
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
Index: llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
===================================================================
--- llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
+++ llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
@@ -2067,7 +2067,9 @@
break;
SDValue Src = Node->getOperand(1);
auto *Ld = dyn_cast<LoadSDNode>(Src);
- if (!Ld)
+ // Can't fold load update node because the second
+ // output is used so that load update node can't be removed.
+ if (!Ld || Ld->isIndexed())
break;
EVT MemVT = Ld->getMemoryVT();
// The memory VT should be the same size as the element type.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152222.528719.patch
Type: text/x-patch
Size: 619 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230606/8621f031/attachment.bin>
More information about the llvm-commits
mailing list