Skip to content

Commit

Permalink
Disable MachineSink on convergent operations, similar to how IR Sink is
Browse files Browse the repository at this point in the history
restricted.  No test because no in-tree target currently has convergent
MachineInstr's.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238763 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
resistor committed Jun 1, 2015
1 parent 57e487e commit 6f9474c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/CodeGen/MachineSink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,10 @@ bool MachineSinking::SinkInstruction(MachineInstr *MI, bool &SawStore) {
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
Expand Down

0 comments on commit 6f9474c

Please sign in to comment.