diff options
| author | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2016-03-31 15:37:06 +0000 |
|---|---|---|
| committer | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2016-03-31 15:37:06 +0000 |
| commit | 3707ba80302b184c850ccdab2191650b75486742 (patch) | |
| tree | 311ca1ffe77dff4042cc8c41977a3067459ff22c /llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp | |
| parent | a621a7f9c30b86f7c38487ab2c24dea4b14043b3 (diff) | |
| download | bcm5719-llvm-3707ba80302b184c850ccdab2191650b75486742.tar.gz bcm5719-llvm-3707ba80302b184c850ccdab2191650b75486742.zip | |
[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/Instrumentation/DataFlowSanitizer.cpp')
0 files changed, 0 insertions, 0 deletions

