aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-02-06 04:34:07 +0000
committerChris Lattner <sabre@nondot.org>2009-02-06 04:34:07 +0000
commite991ced7cb5cb86d1c33b8d400b1be41185bc69f (patch)
tree5afd04c3abf10bf4d652e0f454741a5ed6b1f964 /lib
parentf90b2a7742ddeddc448586cc050818a664419e74 (diff)
downloadexternal_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.cpp4
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;