diff options
author | Derek Schuff <dschuff@chromium.org> | 2012-10-15 14:03:16 -0700 |
---|---|---|
committer | Derek Schuff <dschuff@chromium.org> | 2012-10-15 14:03:16 -0700 |
commit | 9a2ec7c6ed3eb1b133257f5f40503034fcde40de (patch) | |
tree | 06f6f2e29330c940059a4df7193b905a01c3b7bf /lib/Analysis/BasicAliasAnalysis.cpp | |
parent | 0ecc9098929275a2b6672d625106225231bed813 (diff) | |
parent | bb20b24224734f5369d124181d086703ca439dd7 (diff) |
Merge commit 'bb20b24224734f5369d124181d086703ca439dd7'
Conflicts:
lib/Target/X86/X86FrameLowering.cpp
lib/Target/X86/X86ISelLowering.cpp
Diffstat (limited to 'lib/Analysis/BasicAliasAnalysis.cpp')
-rw-r--r-- | lib/Analysis/BasicAliasAnalysis.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Analysis/BasicAliasAnalysis.cpp b/lib/Analysis/BasicAliasAnalysis.cpp index 263bfc031f..36903f94e2 100644 --- a/lib/Analysis/BasicAliasAnalysis.cpp +++ b/lib/Analysis/BasicAliasAnalysis.cpp @@ -286,7 +286,8 @@ DecomposeGEPExpression(const Value *V, int64_t &BaseOffs, V = GEPOp->getOperand(0); continue; } - + + unsigned AS = GEPOp->getPointerAddressSpace(); // Walk the indices of the GEP, accumulating them into BaseOff/VarIndices. gep_type_iterator GTI = gep_type_begin(GEPOp); for (User::const_op_iterator I = GEPOp->op_begin()+1, @@ -315,7 +316,7 @@ DecomposeGEPExpression(const Value *V, int64_t &BaseOffs, // If the integer type is smaller than the pointer size, it is implicitly // sign extended to pointer size. unsigned Width = cast<IntegerType>(Index->getType())->getBitWidth(); - if (TD->getPointerSizeInBits() > Width) + if (TD->getPointerSizeInBits(AS) > Width) Extension = EK_SignExt; // Use GetLinearExpression to decompose the index into a C1*V+C2 form. @@ -344,7 +345,7 @@ DecomposeGEPExpression(const Value *V, int64_t &BaseOffs, // Make sure that we have a scale that makes sense for this target's // pointer size. - if (unsigned ShiftBits = 64-TD->getPointerSizeInBits()) { + if (unsigned ShiftBits = 64-TD->getPointerSizeInBits(AS)) { Scale <<= ShiftBits; Scale = (int64_t)Scale >> ShiftBits; } |