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

Evan Cheng evan.cheng at apple.com
Thu Jan 4 17:46:35 PST 2007



Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAGISel.cpp updated: 1.339 -> 1.340
---
Log message:

GEP subscript is interpreted as a signed value.

---
Diffs of the changes:  (+1 -1)

 SelectionDAGISel.cpp |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.339 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.340
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.339	Thu Jan  4 16:22:37 2007
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp	Thu Jan  4 19:46:20 2007
@@ -1703,7 +1703,7 @@
       if (ConstantInt *CI = dyn_cast<ConstantInt>(Idx)) {
         if (CI->getZExtValue() == 0) continue;
         uint64_t Offs = 
-            TD->getTypeSize(Ty)*cast<ConstantInt>(CI)->getZExtValue();
+            TD->getTypeSize(Ty)*cast<ConstantInt>(CI)->getSExtValue();
         N = DAG.getNode(ISD::ADD, N.getValueType(), N, getIntPtrConstant(Offs));
         continue;
       }






More information about the llvm-commits mailing list