aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-04-25 21:58:54 +0000
committerChris Lattner <sabre@nondot.org>2003-04-25 21:58:54 +0000
commit8bdd129c8a4db68e7a70b05ef03957509b55a6f9 (patch)
treea6261924062d1909c4898ba39728fee9496b0abe /lib/Target
parentb8fdd8ba6106783e95b370ec7ace74e10db3f9fa (diff)
downloadexternal_llvm-8bdd129c8a4db68e7a70b05ef03957509b55a6f9.zip
external_llvm-8bdd129c8a4db68e7a70b05ef03957509b55a6f9.tar.gz
external_llvm-8bdd129c8a4db68e7a70b05ef03957509b55a6f9.tar.bz2
Fix bogus assert
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5949 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r--lib/Target/X86/InstSelectSimple.cpp6
-rw-r--r--lib/Target/X86/X86ISelSimple.cpp6
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/Target/X86/InstSelectSimple.cpp b/lib/Target/X86/InstSelectSimple.cpp
index 13e4f02..2c6f4fb 100644
--- a/lib/Target/X86/InstSelectSimple.cpp
+++ b/lib/Target/X86/InstSelectSimple.cpp
@@ -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 @@ inline static MachineInstrBuilder BMI(MachineBasicBlock *MBB,
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);
diff --git a/lib/Target/X86/X86ISelSimple.cpp b/lib/Target/X86/X86ISelSimple.cpp
index 13e4f02..2c6f4fb 100644
--- a/lib/Target/X86/X86ISelSimple.cpp
+++ b/lib/Target/X86/X86ISelSimple.cpp
@@ -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 @@ inline static MachineInstrBuilder BMI(MachineBasicBlock *MBB,
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);