aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp b/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
index 27fa0b4..6601e70 100644
--- a/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
+++ b/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
@@ -415,8 +415,7 @@ bool PreISelIntrinsicLowering::expandMemIntrinsicUses(Function &F) const {
GV->setAlignment(Align(16));
Value *PatternPtr = GV;
Value *NumBytes = Builder.CreateMul(
- Builder.getInt64(DL.getTypeSizeInBits(Memset->getValue()->getType()) /
- 8),
+ Builder.getInt64(DL.getTypeAllocSize(Memset->getValue()->getType())),
Memset->getLength());
CallInst *MemsetPattern16Call =
Builder.CreateCall(MSP, {Memset->getRawDest(), PatternPtr, NumBytes});