aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp')
-rw-r--r--llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp b/llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
index 260d7889906b..c0dbd52acbab 100644
--- a/llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
@@ -103,7 +103,6 @@
#include "llvm/Support/ModRef.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Utils/Local.h"
-#include "llvm/Transforms/Vectorize.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
@@ -900,9 +899,9 @@ bool Vectorizer::vectorizeChain(Chain &C) {
// Chain is in offset order, so C[0] is the instr with the lowest offset,
// i.e. the root of the vector.
- Value *Bitcast = Builder.CreateBitCast(
- getLoadStorePointerOperand(C[0].Inst), VecTy->getPointerTo(AS));
- VecInst = Builder.CreateAlignedLoad(VecTy, Bitcast, Alignment);
+ VecInst = Builder.CreateAlignedLoad(VecTy,
+ getLoadStorePointerOperand(C[0].Inst),
+ Alignment);
unsigned VecIdx = 0;
for (const ChainElem &E : C) {
@@ -976,8 +975,7 @@ bool Vectorizer::vectorizeChain(Chain &C) {
// i.e. the root of the vector.
VecInst = Builder.CreateAlignedStore(
Vec,
- Builder.CreateBitCast(getLoadStorePointerOperand(C[0].Inst),
- VecTy->getPointerTo(AS)),
+ getLoadStorePointerOperand(C[0].Inst),
Alignment);
}