Give the longer name to the instruction that will probably be eliminated later
llvm-svn: 2581
This commit is contained in:
parent
ce59a3d5f5
commit
6bd7ac6205
|
@ -169,9 +169,10 @@ bool Reassociate::ReassociateBB(BasicBlock *BB) {
|
||||||
//
|
//
|
||||||
Instruction *New = BinaryOperator::create(Instruction::Add,
|
Instruction *New = BinaryOperator::create(Instruction::Add,
|
||||||
Inst->getOperand(0), Inst,
|
Inst->getOperand(0), Inst,
|
||||||
Inst->getName()+".add");
|
Inst->getName());
|
||||||
// Everyone now refers to the add instruction...
|
// Everyone now refers to the add instruction...
|
||||||
Inst->replaceAllUsesWith(New);
|
Inst->replaceAllUsesWith(New);
|
||||||
|
Inst->setName(Inst->getOperand(1)->getName()+".neg");
|
||||||
New->setOperand(1, Inst); // Except for the add inst itself!
|
New->setOperand(1, Inst); // Except for the add inst itself!
|
||||||
|
|
||||||
BI = BB->getInstList().insert(BI+1, New)-1; // Add to the basic block...
|
BI = BB->getInstList().insert(BI+1, New)-1; // Add to the basic block...
|
||||||
|
|
Loading…
Reference in New Issue