aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2023-12-09 13:28:42 +0000
committerDimitry Andric <dim@FreeBSD.org>2023-12-09 13:28:42 +0000
commitb1c73532ee8997fe5dfbeb7d223027bdf99758a0 (patch)
tree7d6e51c294ab6719475d660217aa0c0ad0526292 /llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
parent7fa27ce4a07f19b07799a767fc29416f3b625afb (diff)
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);
}