summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
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
commit6bd7ac620526d9f83465f5f072dc4645c334c683 (patch)
treebbd823bba825ad9e072aacb631b3a8d54db8a246 /llvm/lib/Transforms
parentce59a3d5f50820ab65aba32775fa225dc7e71c15 (diff)
downloadbcm5719-llvm-6bd7ac620526d9f83465f5f072dc4645c334c683.tar.gz
bcm5719-llvm-6bd7ac620526d9f83465f5f072dc4645c334c683.zip
Give the longer name to the instruction that will probably be eliminated later
llvm-svn: 2581
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/Reassociate.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/Reassociate.cpp b/llvm/lib/Transforms/Scalar/Reassociate.cpp
index 6eb275c8fdb..cb7f47b9884 100644
--- a/llvm/lib/Transforms/Scalar/Reassociate.cpp
+++ b/llvm/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...
OpenPOWER on IntegriCloud