mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
GEP subscript is interpreted as a signed value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32888 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ac8d27686d
commit
0d630d2204
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user