mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
Don't hoist instructions that have implicit uses or defines. Before, it was
hoisting out some "test" and "cmp" instructions. This was obvious badness. llvm-svn: 54908
This commit is contained in:
parent
371935de4a
commit
12569b3697
@ -264,6 +264,11 @@ bool MachineLICM::IsLoopInvariantInst(MachineInstr &I) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (I.getDesc().getImplicitDefs() || I.getDesc().getImplicitUses()) {
|
||||||
|
DOUT << "Cannot hoist with implicit defines or uses\n";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// The instruction is loop invariant if all of its operands are.
|
// The instruction is loop invariant if all of its operands are.
|
||||||
for (unsigned i = 0, e = I.getNumOperands(); i != e; ++i) {
|
for (unsigned i = 0, e = I.getNumOperands(); i != e; ++i) {
|
||||||
const MachineOperand &MO = I.getOperand(i);
|
const MachineOperand &MO = I.getOperand(i);
|
||||||
|
Loading…
Reference in New Issue
Block a user