From 9eb337a2b7bc24eabdba32a801c8b36d5ac9c11d Mon Sep 17 00:00:00 2001 From: Wesley Peck Date: Wed, 22 Dec 2010 01:29:32 +0000 Subject: [PATCH] Don't generate carry bit when loading immediate values on the Microblaze. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122385 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/MBlaze/MBlazeInstrInfo.cpp | 2 +- lib/Target/MBlaze/MBlazeInstrInfo.td | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Target/MBlaze/MBlazeInstrInfo.cpp b/lib/Target/MBlaze/MBlazeInstrInfo.cpp index 57c03feb974..b353dcdef05 100644 --- a/lib/Target/MBlaze/MBlazeInstrInfo.cpp +++ b/lib/Target/MBlaze/MBlazeInstrInfo.cpp @@ -80,7 +80,7 @@ copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, DebugLoc DL, unsigned DestReg, unsigned SrcReg, bool KillSrc) const { - llvm::BuildMI(MBB, I, DL, get(MBlaze::ADD), DestReg) + llvm::BuildMI(MBB, I, DL, get(MBlaze::ADDK), DestReg) .addReg(SrcReg, getKillRegState(KillSrc)).addReg(MBlaze::R0); } diff --git a/lib/Target/MBlaze/MBlazeInstrInfo.td b/lib/Target/MBlaze/MBlazeInstrInfo.td index 990b95da31b..548cc07aa82 100644 --- a/lib/Target/MBlaze/MBlazeInstrInfo.td +++ b/lib/Target/MBlaze/MBlazeInstrInfo.td @@ -714,7 +714,7 @@ let usesCustomInserter=1 in { //===----------------------------------------------------------------------===// // Small immediates -def : Pat<(i32 0), (ADD (i32 R0), (i32 R0))>; +def : Pat<(i32 0), (ADDK (i32 R0), (i32 R0))>; def : Pat<(i32 immSExt16:$imm), (ADDIK (i32 R0), imm:$imm)>; def : Pat<(i32 immZExt16:$imm), (ORI (i32 R0), imm:$imm)>;