[PATCH] D152222: [RISCV] Fix the num of chain SDNode introduced in 9e0f9f113248093e737c4cf5450f0a3c2bcd90ba

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 5 21:16:12 PDT 2023

craig.topper added a comment.

In D152222#4397994 <https://reviews.llvm.org/D152222#4397994>, @zixuan-wu wrote:

> In D152222#4397984 <https://reviews.llvm.org/D152222#4397984>, @craig.topper wrote:
>> In D152222#4397976 <https://reviews.llvm.org/D152222#4397976>, @zixuan-wu wrote:
>>> In D152222#4397974 <https://reviews.llvm.org/D152222#4397974>, @craig.topper wrote:
>>>> When does a load and update node occur on RISC-v?
>>> It's actually less frequent because the standard extension does not have load update instruction. But XTHeadFMemIdx extension has load update instruction, so it appears in downstream.
>> Should we even do the transform for an indexed load? Won’t we lose the update part of the load update?
> It's not about the replacement of load update node, it's about VMV_V_X_VL node replacement. It just uses the data part of load update result. As the chain replacement, it just upgrades the chain from load update node to new vector load node because the new vector load node inserted after load update node in sequence order.

It’s not legal to replace the chain result of the original node wasn’t deleted. We would need to insert a TokenFactor to collect the chains from the new and old load and replace all uses of the old load’s chain with the TokenFactor result. Otherwise the dependencies aren’t maintained.

  rG LLVM Github Monorepo



More information about the llvm-commits mailing list