diff options
author | Owen Anderson <resistor@mac.com> | 2008-08-26 18:03:31 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2008-08-26 18:03:31 +0000 |
commit | 940f83e772ca2007d62faffc83094bd7e8da6401 (patch) | |
tree | 694da4480cf7a13b73a4526ac7769da901b501e7 /lib/Target/Sparc | |
parent | a0b3909d432e9f2c79aee8ec3133f9b9ec71dc1a (diff) |
Make TargetInstrInfo::copyRegToReg return a bool indicating whether the copy requested
was inserted or not. This allows bitcast in fast isel to properly handle the case
where an appropriate reg-to-reg copy is not available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55375 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Sparc')
-rw-r--r-- | lib/Target/Sparc/SparcInstrInfo.cpp | 11 | ||||
-rw-r--r-- | lib/Target/Sparc/SparcInstrInfo.h | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/lib/Target/Sparc/SparcInstrInfo.cpp b/lib/Target/Sparc/SparcInstrInfo.cpp index 68605a75d4..ab18044d6d 100644 --- a/lib/Target/Sparc/SparcInstrInfo.cpp +++ b/lib/Target/Sparc/SparcInstrInfo.cpp @@ -109,14 +109,14 @@ SparcInstrInfo::InsertBranch(MachineBasicBlock &MBB,MachineBasicBlock *TBB, return 1; } -void SparcInstrInfo::copyRegToReg(MachineBasicBlock &MBB, +bool SparcInstrInfo::copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, unsigned DestReg, unsigned SrcReg, const TargetRegisterClass *DestRC, const TargetRegisterClass *SrcRC) const { if (DestRC != SrcRC) { - cerr << "Not yet supported!"; - abort(); + // Not yet supported! + return false; } if (DestRC == SP::IntRegsRegisterClass) @@ -127,7 +127,10 @@ void SparcInstrInfo::copyRegToReg(MachineBasicBlock &MBB, BuildMI(MBB, I, get(Subtarget.isV9() ? SP::FMOVD : SP::FpMOVD),DestReg) .addReg(SrcReg); else - assert (0 && "Can't copy this register"); + // Can't copy this register + return false; + + return true; } void SparcInstrInfo:: diff --git a/lib/Target/Sparc/SparcInstrInfo.h b/lib/Target/Sparc/SparcInstrInfo.h index d19d55f84f..aadbefd9db 100644 --- a/lib/Target/Sparc/SparcInstrInfo.h +++ b/lib/Target/Sparc/SparcInstrInfo.h @@ -68,7 +68,7 @@ public: MachineBasicBlock *FBB, const SmallVectorImpl<MachineOperand> &Cond) const; - virtual void copyRegToReg(MachineBasicBlock &MBB, + virtual bool copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, unsigned DestReg, unsigned SrcReg, const TargetRegisterClass *DestRC, |