aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/SplitModule.cpp
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2016-03-31 15:37:06 +0000
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2016-03-31 15:37:06 +0000
commit3707ba80302b184c850ccdab2191650b75486742 (patch)
tree311ca1ffe77dff4042cc8c41977a3067459ff22c /llvm/lib/Transforms/Utils/SplitModule.cpp
parenta621a7f9c30b86f7c38487ab2c24dea4b14043b3 (diff)
downloadllvm-3707ba80302b184c850ccdab2191650b75486742.zip
llvm-3707ba80302b184c850ccdab2191650b75486742.tar.gz
llvm-3707ba80302b184c850ccdab2191650b75486742.tar.bz2
[PowerPC] Correctly compute 64-bit offsets in fast isel
PPCSimplifyAddress contains this code: IntegerType *OffsetTy = ((VT == MVT::i32) ? Type::getInt32Ty(*Context) : Type::getInt64Ty(*Context)); to determine the type to be used for an index register, if one needs to be created. However, the "VT" here is the type of the data being loaded or stored, *not* the type of an address. This means that if a data element of type i32 is accessed using an index that does not not fit into 32 bits, a wrong address is computed here. Note that PPCFastISel is only ever used on 64-bit currently, so the type of an address is actually *always* MVT::i64. Other parts of the code, even in this same PPCSimplifyAddress routine, already rely on that fact. Thus, this patch changes the code to simply unconditionally use Type::getInt64Ty(*Context) as OffsetTy. llvm-svn: 265023
Diffstat (limited to 'llvm/lib/Transforms/Utils/SplitModule.cpp')
0 files changed, 0 insertions, 0 deletions