aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/DataLayout.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/DataLayout.cpp')
-rw-r--r--llvm/lib/IR/DataLayout.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/DataLayout.cpp b/llvm/lib/IR/DataLayout.cpp
index 289d525..379c6d5 100644
--- a/llvm/lib/IR/DataLayout.cpp
+++ b/llvm/lib/IR/DataLayout.cpp
@@ -939,7 +939,7 @@ std::optional<APInt> DataLayout::getGEPIndexForOffset(Type *&ElemTy,
return getElementIndex(getTypeAllocSize(ElemTy), Offset);
}
- if (auto *VecTy = dyn_cast<VectorType>(ElemTy)) {
+ if (isa<VectorType>(ElemTy)) {
// Vector GEPs are partially broken (e.g. for overaligned element types),
// and may be forbidden in the future, so avoid generating GEPs into
// vectors. See https://discourse.llvm.org/t/67497