[ARM] Fix Chain/Glue Bug in PerformVMOVhrCombine
authorArchibald Elliott <archibald.elliott@arm.com>
Thu, 2 Mar 2023 14:46:40 +0000 (14:46 +0000)
committerArchibald Elliott <archibald.elliott@arm.com>
Mon, 6 Mar 2023 11:55:54 +0000 (11:55 +0000)
commitb189218d4422ba3f4676fa1191961df8e4732783
treecc0cab723ee20b577f3dde213783ab12bf97c14e
parentc314667141da358e1a914b15267986206a8106b3
[ARM] Fix Chain/Glue Bug in PerformVMOVhrCombine

In this optimisation, the Chain and Glue from the original CopyFromReg
was being lost by this optimisation, which resulted in miscompiles.

This fix just ensures that the input chains are correctly updated, and
that any any users are also updated with the new chain from the new
CopyFromReg.

Fixes #60510.

Differential Revision: https://reviews.llvm.org/D143713
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/test/CodeGen/ARM/fp16-return-pr60510.ll