aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Constants.cpp
diff options
context:
space:
mode:
authorPaul Walker <paul.walker@arm.com>2023-02-27 20:16:07 +0000
committerPaul Walker <paul.walker@arm.com>2023-03-14 16:48:33 +0000
commit62e46f262158e2a6ea9c1c458f52633bb40a8590 (patch)
tree23dccb894f8248c32b6fac7f5db287c3a040cb32 /llvm/lib/IR/Constants.cpp
parentfdda602c04e43f7be8820996d3161abb71bec67b (diff)
downloadllvm-62e46f262158e2a6ea9c1c458f52633bb40a8590.zip
llvm-62e46f262158e2a6ea9c1c458f52633bb40a8590.tar.gz
llvm-62e46f262158e2a6ea9c1c458f52633bb40a8590.tar.bz2
[LLVM] Remove support for constant scalable vector GEPs.
This work has fallen out from D134648 as a requirement to loosen the "constness" of vscale. Differential Revision: https://reviews.llvm.org/D145404
Diffstat (limited to 'llvm/lib/IR/Constants.cpp')
-rw-r--r--llvm/lib/IR/Constants.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/IR/Constants.cpp b/llvm/lib/IR/Constants.cpp
index 6a6209c..9348d1a 100644
--- a/llvm/lib/IR/Constants.cpp
+++ b/llvm/lib/IR/Constants.cpp
@@ -2464,6 +2464,7 @@ Constant *ConstantExpr::getGetElementPtr(Type *Ty, Constant *C,
Type *OnlyIfReducedTy) {
PointerType *OrigPtrTy = cast<PointerType>(C->getType()->getScalarType());
assert(Ty && "Must specify element type");
+ assert(isSupportedGetElementPtr(Ty) && "Element type is unsupported!");
assert(OrigPtrTy->isOpaqueOrPointeeTypeMatches(Ty));
if (Constant *FC =