aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/CSKY/CSKYInstrInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/CSKY/CSKYInstrInfo.cpp')
-rw-r--r--llvm/lib/Target/CSKY/CSKYInstrInfo.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Target/CSKY/CSKYInstrInfo.cpp b/llvm/lib/Target/CSKY/CSKYInstrInfo.cpp
index c57ccb9d6eea..d490b385ac16 100644
--- a/llvm/lib/Target/CSKY/CSKYInstrInfo.cpp
+++ b/llvm/lib/Target/CSKY/CSKYInstrInfo.cpp
@@ -14,6 +14,7 @@
#include "CSKYConstantPoolValue.h"
#include "CSKYMachineFunctionInfo.h"
#include "CSKYTargetMachine.h"
+#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/MC/MCContext.h"
#define DEBUG_TYPE "csky-instr-info"
@@ -222,9 +223,10 @@ bool CSKYInstrInfo::reverseBranchCondition(
Register CSKYInstrInfo::movImm(MachineBasicBlock &MBB,
MachineBasicBlock::iterator MBBI,
- const DebugLoc &DL, int64_t Val,
+ const DebugLoc &DL, uint64_t Val,
MachineInstr::MIFlag Flag) const {
- assert(isUInt<32>(Val) && "should be uint32");
+ if (!isInt<32>(Val))
+ report_fatal_error("Should only materialize 32-bit constants.");
MachineRegisterInfo &MRI = MBB.getParent()->getRegInfo();
@@ -475,9 +477,6 @@ void CSKYInstrInfo::copyPhysReg(MachineBasicBlock &MBB,
MachineBasicBlock::iterator I,
const DebugLoc &DL, MCRegister DestReg,
MCRegister SrcReg, bool KillSrc) const {
-
- MachineRegisterInfo &MRI = MBB.getParent()->getRegInfo();
-
if (CSKY::GPRRegClass.contains(SrcReg) &&
CSKY::CARRYRegClass.contains(DestReg)) {
if (STI.hasE2()) {