================
@@ -116,14 +117,56 @@ static void splitBlock(MachineBasicBlock &MBB, 
MachineInstr &MI,
   MDT->applyUpdates(DTUpdates);
 }
 
-void SILateBranchLowering::expandChainCall(MachineInstr &MI) {
+static void addRegOrCopyOp(MachineInstrBuilder &MIB, MachineOperand &Op) {
+  if (Op.isReg())
+    MIB.addReg(Op.getReg());
+  else
+    MIB->addOperand(Op);
----------------
rovka wrote:

This is because the same register may be used twice, and if it has a killed 
flag then that might get copied to an "earlier" instruction. This is what 
`remove-register-flags.mir` is testing. For now I renamed the helper, I should 
probably add a comment too...

https://github.com/llvm/llvm-project/pull/130094
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to