Eliminate a compilation warning.
authorEvan Cheng <evan.cheng@apple.com>
Mon, 21 Jul 2008 20:02:45 +0000 (20:02 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Mon, 21 Jul 2008 20:02:45 +0000 (20:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53873 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86FloatingPoint.cpp

index 6525136d0dea9fdc1f06afe96b659845ac8c8176..84ed6bae2c605b699121d9af1cbb799e5a06263b 100644 (file)
@@ -300,11 +300,13 @@ namespace {
   };
 }
 
+#ifndef NDEBUG
 static bool TableIsSorted(const TableEntry *Table, unsigned NumEntries) {
   for (unsigned i = 0; i != NumEntries-1; ++i)
     if (!(Table[i] < Table[i+1])) return false;
   return true;
 }
+#endif
 
 static int Lookup(const TableEntry *Table, unsigned N, unsigned Opcode) {
   const TableEntry *I = std::lower_bound(Table, Table+N, Opcode);
@@ -662,8 +664,10 @@ void FPS::handleOneArgFP(MachineBasicBlock::iterator &I) {
 ///
 void FPS::handleOneArgFPRW(MachineBasicBlock::iterator &I) {
   MachineInstr *MI = I;
+#ifndef NDEBUG
   unsigned NumOps = MI->getDesc().getNumOperands();
   assert(NumOps >= 2 && "FPRW instructions must have 2 ops!!");
+#endif
 
   // Is this the last use of the source register?
   unsigned Reg = getFPReg(MI->getOperand(1));