================ @@ -1515,8 +1515,11 @@ mlir::LogicalResult CIRToLLVMAllocaOpLowering::matchAndRewrite( assert(!cir::MissingFeatures::addressSpace()); assert(!cir::MissingFeatures::opAllocaAnnotations()); - rewriter.replaceOpWithNewOp<mlir::LLVM::AllocaOp>( - op, resultTy, elementTy, size, op.getAlignmentAttr().getInt()); + unsigned alignment = 0; + if (auto alignAttr = op.getAlignmentAttr()) ---------------- Lancern wrote:
```suggestion if (mlir::IntegerAttr alignAttr = op.getAlignmentAttr()) ``` https://github.com/llvm/llvm-project/pull/172663 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
