diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2007-01-05 01:46:20 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2007-01-05 01:46:20 +0000 |
| commit | 8ec5283dc4abf089dd4127e85e71bab5e344a5fc (patch) | |
| tree | 536418af4bcb0a1fbc94940e2f2823663194f019 /llvm/lib/CodeGen | |
| parent | 92c671e77e9491165d62dcf34f282859cbf2257a (diff) | |
| download | bcm5719-llvm-8ec5283dc4abf089dd4127e85e71bab5e344a5fc.tar.gz bcm5719-llvm-8ec5283dc4abf089dd4127e85e71bab5e344a5fc.zip | |
GEP subscript is interpreted as a signed value.
llvm-svn: 32888
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index f4fe873f9fb..d8d862d7098 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -1703,7 +1703,7 @@ void SelectionDAGLowering::visitGetElementPtr(User &I) { 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; } |

