aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/Reassociate.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-05-09 20:11:23 +0000
committerChris Lattner <sabre@nondot.org>2002-05-09 20:11:23 +0000
commit0aa7cd605df9faa57f192c0bbd04af54e7d5461d (patch)
treeb527b0d1136d46a03ba20e1533c15bb9acb4d7ae /lib/Transforms/Scalar/Reassociate.cpp
parent0097e41993552deb2568611179527387312ba72a (diff)
Give the longer name to the instruction that will probably be eliminated later
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2581 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/Reassociate.cpp')
-rw-r--r--lib/Transforms/Scalar/Reassociate.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/Reassociate.cpp b/lib/Transforms/Scalar/Reassociate.cpp
index 6eb275c8fd..cb7f47b988 100644
--- a/lib/Transforms/Scalar/Reassociate.cpp
+++ b/lib/Transforms/Scalar/Reassociate.cpp
@@ -169,9 +169,10 @@ bool Reassociate::ReassociateBB(BasicBlock *BB) {
//
Instruction *New = BinaryOperator::create(Instruction::Add,
Inst->getOperand(0), Inst,
- Inst->getName()+".add");
+ Inst->getName());
// Everyone now refers to the add instruction...
Inst->replaceAllUsesWith(New);
+ Inst->setName(Inst->getOperand(1)->getName()+".neg");
New->setOperand(1, Inst); // Except for the add inst itself!
BI = BB->getInstList().insert(BI+1, New)-1; // Add to the basic block...