summaryrefslogtreecommitdiff
path: root/clang/lib/CIR/Dialect/Transforms/HoistAllocas.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CIR/Dialect/Transforms/HoistAllocas.cpp')
-rw-r--r--clang/lib/CIR/Dialect/Transforms/HoistAllocas.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CIR/Dialect/Transforms/HoistAllocas.cpp b/clang/lib/CIR/Dialect/Transforms/HoistAllocas.cpp
index 4e0a041d26ce..72bbf08c79b1 100644
--- a/clang/lib/CIR/Dialect/Transforms/HoistAllocas.cpp
+++ b/clang/lib/CIR/Dialect/Transforms/HoistAllocas.cpp
@@ -42,7 +42,8 @@ static void process(mlir::ModuleOp mod, cir::FuncOp func) {
if (alloca->getBlock() == &entryBlock)
return;
// Don't hoist allocas with dynamic alloca size.
- assert(!cir::MissingFeatures::opAllocaDynAllocSize());
+ if (alloca.getDynAllocSize())
+ return;
// Hoist allocas into the entry block.