[PATCH] D78087: [MachineSink] Fix for breaking phi edges with instructions with multiple defs

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 14 01:33:22 PDT 2020


SjoerdMeijer added a comment.

Hi Dave, thanks for fixing this. Probably good to mention in the description that this is fixing PR44981.
Some nits inlined.



================
Comment at: llvm/lib/CodeGen/MachineSink.cpp:283
   //     %reg16386 = PHI %reg16434, %bb.0, %reg16385, %bb.1
-  BreakPHIEdge = true;
+  bool LocalBreakPHIEdge = true;
   for (MachineOperand &MO : MRI->use_nodbg_operands(Reg)) {
----------------
Fair enough, I am not that familiar with this code, but reading the example above for the first time, I didn't find it that informative, i.e. the description is clear, the example isn't really. But since you're making changes to how this works, it's probably best to add that here as a comment: that we only change the global value when we found a local one, and say something about that example IR.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78087/new/

https://reviews.llvm.org/D78087





More information about the llvm-commits mailing list