[Mlir-commits] [mlir] [MLIR][LLVMIR] Issue when importing LLVM modules which contain LandingPad Instructions (PR #171107)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Dec 8 06:54:15 PST 2025
================
@@ -1765,17 +1765,25 @@ FailureOr<Value> ModuleImport::convertConstant(llvm::Constant *constant) {
return lookupValue(inst);
}
+ // Convert zero-initialized aggregates to ZeroOp.
+ if (auto *aggregateZero = dyn_cast<llvm::ConstantAggregateZero>(constant)) {
+ Type type = convertType(aggregateZero->getType());
+ return builder.create<ZeroOp>(loc, type).getResult();
+ }
+
// Convert aggregate constants.
if (isa<llvm::ConstantAggregate>(constant) ||
isa<llvm::ConstantAggregateZero>(constant)) {
// Lookup the aggregate elements that have been converted before.
SmallVector<Value> elementValues;
+ bool isAggregate = false;
----------------
Bhuvan1527 wrote:
Hi @gysit
Yes, you've rightly pointed. I'm sorry I missed it.
I've addressed in the latest commit
https://github.com/llvm/llvm-project/pull/171107
More information about the Mlir-commits
mailing list