[llvm-commits] [SignlessTypes] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Reid Spencer reid at x10sys.com
Wed Oct 25 18:58:36 PDT 2006



Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAGISel.cpp updated: 1.289.2.6 -> 1.289.2.7
---
Log message:

Round 2 of DIV updates. 


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

 SelectionDAGISel.cpp |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.289.2.6 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.289.2.7
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.289.2.6	Mon Oct 23 13:13:26 2006
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp	Wed Oct 25 20:58:05 2006
@@ -1109,13 +1109,12 @@
   SDOperand Op1 = getValue(I.getOperand(0));
   SDOperand Op2 = getValue(I.getOperand(1));
 
-  if (Ty->isIntegral()) {
-    setValue(&I, DAG.getNode(IntOp, Op1.getValueType(), Op1, Op2));
-  } else {
-    const PackedType *PTy = cast<PackedType>(Ty);
+  if (const PackedType *PTy = dyn_cast<PackedType>(Ty)) {
     SDOperand Num = DAG.getConstant(PTy->getNumElements(), MVT::i32);
     SDOperand Typ = DAG.getValueType(TLI.getValueType(PTy->getElementType()));
     setValue(&I, DAG.getNode(VecOp, MVT::Vector, Op1, Op2, Num, Typ));
+  } else {
+    setValue(&I, DAG.getNode(IntOp, Op1.getValueType(), Op1, Op2));
   }
 }
 
@@ -1125,13 +1124,12 @@
   SDOperand Op1 = getValue(I.getOperand(0));
   SDOperand Op2 = getValue(I.getOperand(1));
 
-  if (Ty->isFloatingPoint()) {
-    setValue(&I, DAG.getNode(FPOp, Op1.getValueType(), Op1, Op2));
-  } else {
-    const PackedType *PTy = cast<PackedType>(Ty);
+  if (const PackedType *PTy = dyn_cast<PackedType>(Ty)) {
     SDOperand Num = DAG.getConstant(PTy->getNumElements(), MVT::i32);
     SDOperand Typ = DAG.getValueType(TLI.getValueType(PTy->getElementType()));
     setValue(&I, DAG.getNode(VecOp, MVT::Vector, Op1, Op2, Num, Typ));
+  } else {
+    setValue(&I, DAG.getNode(FPOp, Op1.getValueType(), Op1, Op2));
   }
 }
 






More information about the llvm-commits mailing list