[LoongArch] Fix handling of the chain of CSRWR and CSRXCHG nodes
`LoongArchISD::CSRWR` has two results. The first is the result of `loongarch.csrwr.[wd]` intrinsic and the second is the chain. But currently the chain is not processed correctly when creating this node, resulting in the `csrwr` instruction being optimized out when the result is not used by anyone [1]. `LoongArchISD::CSRXCHG` has the same issue. This patch addresses this issue. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/loongarch/include/asm/loongarch.h?h=v6.4-rc6#n219 Reviewed By: hev Differential Revision: https://reviews.llvm.org/D153120
parent
4a69fd62
Please register or sign in to comment