mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
make UpdateValueMap handle the possiblity that we could be
copying into the right register, avoiding a copy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68889 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c5040ab606
commit
36e3946ac2
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user