[llvm-commits] [SignlessTypes] CVS: llvm/lib/VMCore/Constants.cpp

Reid Spencer reid at x10sys.com
Fri Oct 20 00:41:39 PDT 2006



Changes in directory llvm/lib/VMCore:

Constants.cpp updated: 1.163.2.6 -> 1.163.2.7
---
Log message:

Restore the Div -> S/UDiv after tag was set.


---
Diffs of the changes:  (+6 -3)

 Constants.cpp |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)


Index: llvm/lib/VMCore/Constants.cpp
diff -u llvm/lib/VMCore/Constants.cpp:1.163.2.6 llvm/lib/VMCore/Constants.cpp:1.163.2.7
--- llvm/lib/VMCore/Constants.cpp:1.163.2.6	Fri Oct 20 02:39:50 2006
+++ llvm/lib/VMCore/Constants.cpp	Fri Oct 20 02:41:24 2006
@@ -419,8 +419,11 @@
 Constant *ConstantExpr::getMul(Constant *C1, Constant *C2) {
   return get(Instruction::Mul, C1, C2);
 }
-Constant *ConstantExpr::getDiv(Constant *C1, Constant *C2) {
-  return get(Instruction::Div, C1, C2);
+Constant *ConstantExpr::getUDiv(Constant *C1, Constant *C2) {
+  return get(Instruction::UDiv, C1, C2);
+}
+Constant *ConstantExpr::getSDiv(Constant *C1, Constant *C2) {
+  return get(Instruction::SDiv, C1, C2);
 }
 Constant *ConstantExpr::getRem(Constant *C1, Constant *C2) {
   return get(Instruction::Rem, C1, C2);
@@ -1410,7 +1413,7 @@
 #ifndef NDEBUG
   switch (Opcode) {
   case Instruction::Add: case Instruction::Sub:
-  case Instruction::Mul: case Instruction::Div:
+  case Instruction::Mul: case Instruction::UDiv: case Instruction::SDiv:
   case Instruction::Rem:
     assert(C1->getType() == C2->getType() && "Op types should be identical!");
     assert((C1->getType()->isInteger() || C1->getType()->isFloatingPoint() ||






More information about the llvm-commits mailing list