summaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/MemoryBuiltins.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2022-11-16 07:46:52 -0800
committerMatt Arsenault <Matthew.Arsenault@amd.com>2022-11-16 09:13:11 -0800
commitad3c91eedc39cdbff6d893df00efba850d8cff97 (patch)
tree3ccc5cc785f09fa8b559a5292880f5d2b9e018d8 /llvm/lib/Analysis/MemoryBuiltins.cpp
parentc6a838e9c89aac0a2d15c4114e19a29497e4d665 (diff)
MemoryBuiltins: Don't check for unsized allocas
The verifier rejects these.
Diffstat (limited to 'llvm/lib/Analysis/MemoryBuiltins.cpp')
-rw-r--r--llvm/lib/Analysis/MemoryBuiltins.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/MemoryBuiltins.cpp b/llvm/lib/Analysis/MemoryBuiltins.cpp
index 351e81aac05d..1cba0571f1fc 100644
--- a/llvm/lib/Analysis/MemoryBuiltins.cpp
+++ b/llvm/lib/Analysis/MemoryBuiltins.cpp
@@ -783,9 +783,6 @@ bool ObjectSizeOffsetVisitor::CheckedZextOrTrunc(APInt &I) {
}
SizeOffsetType ObjectSizeOffsetVisitor::visitAllocaInst(AllocaInst &I) {
- if (!I.getAllocatedType()->isSized())
- return unknown();
-
TypeSize ElemSize = DL.getTypeAllocSize(I.getAllocatedType());
if (ElemSize.isScalable() && Options.EvalMode != ObjectSizeOpts::Mode::Min)
return unknown();