[llvm-commits] CVS: llvm/lib/Target/SparcV9/SparcV9InstrInfo.cpp

Brian Gaeke gaeke at cs.uiuc.edu
Sun May 30 02:35:03 PDT 2004


Changes in directory llvm/lib/Target/SparcV9:

SparcV9InstrInfo.cpp updated: 1.63 -> 1.64

---
Log message:

Transform an occurrence of if(...) { assert (0) }.


---
Diffs of the changes:  (+2 -4)

Index: llvm/lib/Target/SparcV9/SparcV9InstrInfo.cpp
diff -u llvm/lib/Target/SparcV9/SparcV9InstrInfo.cpp:1.63 llvm/lib/Target/SparcV9/SparcV9InstrInfo.cpp:1.64
--- llvm/lib/Target/SparcV9/SparcV9InstrInfo.cpp:1.63	Sun Apr 25 02:04:49 2004
+++ llvm/lib/Target/SparcV9/SparcV9InstrInfo.cpp	Sun May 30 02:34:01 2004
@@ -676,10 +676,8 @@
   const Type* resultType = dest->getType();
   
   MachineOpCode opCode = ChooseAddInstructionByType(resultType);
-  if (opCode == V9::INVALID_OPCODE) {
-    assert(0 && "Unsupported result type in CreateCopyInstructionsByType()");
-    return;
-  }
+  assert (opCode != V9::INVALID_OPCODE
+          && "Unsupported result type in CreateCopyInstructionsByType()");
   
   // if `src' is a constant that doesn't fit in the immed field or if it is
   // a global variable (i.e., a constant address), generate a load





More information about the llvm-commits mailing list