[llvm-commits] CVS: llvm/lib/Target/X86/InstSelectSimple.cpp

Chris Lattner lattner at cs.uiuc.edu
Fri Apr 25 17:00:01 PDT 2003


Changes in directory llvm/lib/Target/X86:

InstSelectSimple.cpp updated: 1.89 -> 1.90

---
Log message:

Fix bogus assert


---
Diffs of the changes:

Index: llvm/lib/Target/X86/InstSelectSimple.cpp
diff -u llvm/lib/Target/X86/InstSelectSimple.cpp:1.89 llvm/lib/Target/X86/InstSelectSimple.cpp:1.90
--- llvm/lib/Target/X86/InstSelectSimple.cpp:1.89	Wed Apr 23 12:57:48 2003
+++ llvm/lib/Target/X86/InstSelectSimple.cpp	Fri Apr 25 16:58:54 2003
@@ -28,8 +28,8 @@
 #include <map>
 
 /// BMI - A special BuildMI variant that takes an iterator to insert the
-/// instruction at as well as a basic block.
-/// this is the version for when you have a destination register in mind.
+/// instruction at as well as a basic block.  This is the version for when you
+/// have a destination register in mind.
 inline static MachineInstrBuilder BMI(MachineBasicBlock *MBB,
                                       MachineBasicBlock::iterator &I,
                                       MachineOpCode Opcode,
@@ -47,7 +47,7 @@
                                       MachineBasicBlock::iterator &I,
                                       MachineOpCode Opcode,
                                       unsigned NumOperands) {
-  assert(I > MBB->begin() && I <= MBB->end() && "Bad iterator!");
+  assert(I >= MBB->begin() && I <= MBB->end() && "Bad iterator!");
   MachineInstr *MI = new MachineInstr(Opcode, NumOperands, true, true);
   I = MBB->insert(I, MI)+1;
   return MachineInstrBuilder(MI);





More information about the llvm-commits mailing list