[PATCH] D137407: [GlobalIsel] Handle carry output generated in narrowScalarAddSub legalize action
Yashwant Singh via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 4 10:53:51 PDT 2022
yassingh added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:5128-5131
+ const TargetRegisterInfo *TRI = MF.getSubtarget().getRegisterInfo();
+ for (MachineInstr &Use : MRI.use_instructions(CarryDst)) {
+ Use.substituteRegister(CarryDst, CarryIn, 0, *TRI);
+ }
----------------
arsenm wrote:
> Changing the uses from here isn't the way the legalizer expects to work. Each instruction is legalized on its own without modifying other instructions, and using intermediate cast operations. The artifact combiner is then responsible for cleaning out illegal intermediate types
The artifact combiner is not automatically doing this. Can you direct where or how should I modify ArtifactCombiner?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137407/new/
https://reviews.llvm.org/D137407
More information about the llvm-commits
mailing list