diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-12 07:46:30 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-12 07:46:30 +0000 |
commit | a101f6f8d38b798a3d7c102dab1d39280ec49b6e (patch) | |
tree | 8b3df6462eb25177a85f406e7aa274fff1cfb772 /llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | |
parent | ada5d6c37e2938fe56719ea37d9581320222998c (diff) | |
download | bcm5719-llvm-a101f6f8d38b798a3d7c102dab1d39280ec49b6e.tar.gz bcm5719-llvm-a101f6f8d38b798a3d7c102dab1d39280ec49b6e.zip |
make UpdateValueMap handle the possiblity that we could be
copying into the right register, avoiding a copy.
llvm-svn: 68889
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/FastISel.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp index 7e300536748..251e96a771c 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -158,7 +158,7 @@ unsigned FastISel::UpdateValueMap(Value* I, unsigned Reg) { unsigned &AssignedReg = ValueMap[I]; if (AssignedReg == 0) AssignedReg = Reg; - else { + else if (Reg != AssignedReg) { const TargetRegisterClass *RegClass = MRI.getRegClass(Reg); TII.copyRegToReg(*MBB, MBB->end(), AssignedReg, Reg, RegClass, RegClass); |