diff options
author | Chris Lattner <sabre@nondot.org> | 2009-02-06 04:34:07 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-02-06 04:34:07 +0000 |
commit | e991ced7cb5cb86d1c33b8d400b1be41185bc69f (patch) | |
tree | 5afd04c3abf10bf4d652e0f454741a5ed6b1f964 /lib | |
parent | f90b2a7742ddeddc448586cc050818a664419e74 (diff) | |
download | external_llvm-e991ced7cb5cb86d1c33b8d400b1be41185bc69f.zip external_llvm-e991ced7cb5cb86d1c33b8d400b1be41185bc69f.tar.gz external_llvm-e991ced7cb5cb86d1c33b8d400b1be41185bc69f.tar.bz2 |
fix PR3489, use bits instead of bytes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63916 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/Scalar/ScalarReplAggregates.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/lib/Transforms/Scalar/ScalarReplAggregates.cpp index c1c8e03..a396dc4 100644 --- a/lib/Transforms/Scalar/ScalarReplAggregates.cpp +++ b/lib/Transforms/Scalar/ScalarReplAggregates.cpp @@ -1431,7 +1431,7 @@ Value *SROA::ConvertScalar_ExtractValue(Value *FromVal, const Type *ToType, Value *Res = UndefValue::get(ST); for (unsigned i = 0, e = ST->getNumElements(); i != e; ++i) { Value *Elt = ConvertScalar_ExtractValue(FromVal, ST->getElementType(i), - Offset+Layout.getElementOffset(i), + Offset+Layout.getElementOffsetInBits(i), Builder); Res = Builder.CreateInsertValue(Res, Elt, i, "tmp"); } @@ -1538,7 +1538,7 @@ Value *SROA::ConvertScalar_InsertValue(Value *SV, Value *Old, for (unsigned i = 0, e = ST->getNumElements(); i != e; ++i) { Value *Elt = Builder.CreateExtractValue(SV, i, "tmp"); Old = ConvertScalar_InsertValue(Elt, Old, - Offset+Layout.getElementOffset(i), + Offset+Layout.getElementOffsetInBits(i), Builder); } return Old; |