implement uncond branch insertion for sparc to fix regressions from last night
authorChris Lattner <sabre@nondot.org>
Tue, 24 Oct 2006 16:39:19 +0000 (16:39 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 24 Oct 2006 16:39:19 +0000 (16:39 +0000)
due to branchfolding

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31157 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Sparc/SparcInstrInfo.cpp
lib/Target/Sparc/SparcInstrInfo.h

index 699c9d21d6ed1c93040feb14ba16fe4942f72fe8..6dbb5fe08c07b77498093c9746d87a506c3d45d3 100644 (file)
@@ -96,3 +96,11 @@ unsigned SparcInstrInfo::isStoreToStackSlot(MachineInstr *MI,
   }
   return 0;
 }
+
+void SparcInstrInfo::InsertBranch(MachineBasicBlock &MBB,MachineBasicBlock *TBB,
+                                  MachineBasicBlock *FBB,
+                                  const std::vector<MachineOperand> &Cond)const{
+  // Can only insert uncond branches so far.
+  assert(Cond.empty() && !FBB && TBB && "Can only handle uncond branches!");
+  BuildMI(&MBB, SP::BA, 1).addMBB(TBB);
+}
\ No newline at end of file
index 166793e2e04c57b59629952c67cf261b5216d2b8..9df9bad120566fd4acc36669c70a873070df70de 100644 (file)
@@ -61,6 +61,11 @@ public:
   /// not, return 0.  This predicate must return 0 if the instruction has
   /// any side effects other than storing to the stack slot.
   virtual unsigned isStoreToStackSlot(MachineInstr *MI, int &FrameIndex) const;
+  
+  
+  virtual void InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB,
+                            MachineBasicBlock *FBB,
+                            const std::vector<MachineOperand> &Cond) const;
 };
 
 }