OSDN Git Service

Fix the build bot break introduced by r320791.
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Fri, 15 Dec 2017 09:51:34 +0000 (09:51 +0000)
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Fri, 15 Dec 2017 09:51:34 +0000 (09:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320798 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PowerPC/PPCInstrInfo.cpp

index a9060b4..e047179 100644 (file)
@@ -2217,8 +2217,13 @@ void PPCInstrInfo::replaceInstrWithLI(MachineInstr &MI,
     MI.RemoveOperand(i);
 
   // Replace the instruction.
-  if (LII.SetCR)
+  if (LII.SetCR) {
     MI.setDesc(get(LII.Is64Bit ? PPC::ANDIo8 : PPC::ANDIo));
+    // Set the immediate.
+    MachineInstrBuilder(*MI.getParent()->getParent(), MI)
+        .addImm(LII.Imm).addReg(PPC::CR0, RegState::ImplicitDefine);
+    return;
+  }
   else
     MI.setDesc(get(LII.Is64Bit ? PPC::LI8 : PPC::LI));