[llvm] r238763 - Disable MachineSink on convergent operations, similar to how IR Sink is

Owen Anderson resistor at mac.com
Mon Jun 1 10:26:31 PDT 2015


Author: resistor
Date: Mon Jun  1 12:26:30 2015
New Revision: 238763

URL: http://llvm.org/viewvc/llvm-project?rev=238763&view=rev
Log:
Disable MachineSink on convergent operations, similar to how IR Sink is
restricted.  No test because no in-tree target currently has convergent
MachineInstr's.

Modified:
    llvm/trunk/lib/CodeGen/MachineSink.cpp

Modified: llvm/trunk/lib/CodeGen/MachineSink.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineSink.cpp?rev=238763&r1=238762&r2=238763&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineSink.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineSink.cpp Mon Jun  1 12:26:30 2015
@@ -655,6 +655,10 @@ bool MachineSinking::SinkInstruction(Mac
   if (!MI->isSafeToMove(AA, SawStore))
     return false;
 
+  // Convergent operations may only be moved to control equivalent locations.
+  if (MI->isConvergent())
+    return false;
+
   // FIXME: This should include support for sinking instructions within the
   // block they are currently in to shorten the live ranges.  We often get
   // instructions sunk into the top of a large block, but it would be better to





More information about the llvm-commits mailing list