diff options
author | Owen Anderson <resistor@mac.com> | 2015-06-01 17:26:30 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2015-06-01 17:26:30 +0000 |
commit | 55313d21dc0a37d575fdb5440927675cc33810d2 (patch) | |
tree | e0918558ed4f72b497a899b7818c73189e3b47b0 | |
parent | 15d180550448a7561e5d3c7e1ffa22602f2b3ed7 (diff) | |
download | bcm5719-llvm-55313d21dc0a37d575fdb5440927675cc33810d2.tar.gz bcm5719-llvm-55313d21dc0a37d575fdb5440927675cc33810d2.zip |
Disable MachineSink on convergent operations, similar to how IR Sink is
restricted. No test because no in-tree target currently has convergent
MachineInstr's.
llvm-svn: 238763
-rw-r--r-- | llvm/lib/CodeGen/MachineSink.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineSink.cpp b/llvm/lib/CodeGen/MachineSink.cpp index 5f03390f146..aed0e500d44 100644 --- a/llvm/lib/CodeGen/MachineSink.cpp +++ b/llvm/lib/CodeGen/MachineSink.cpp @@ -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 |