================ @@ -379,6 +395,23 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy { /*mem_order=*/cir::MemOrderAttr{}); } + cir::LoadOp createAlignedLoad(mlir::Location loc, mlir::Type ty, + mlir::Value ptr, llvm::MaybeAlign align) { + if (ty != mlir::cast<cir::PointerType>(ptr.getType()).getPointee()) + ptr = createPtrBitcast(ptr, ty); + uint64_t alignment = align ? align->value() : 0; + mlir::IntegerAttr alignAttr = getAlignmentAttr(alignment); + return create<cir::LoadOp>(loc, ptr, /*isDeref=*/false, ---------------- xlauko wrote:
```suggestion return cir::LoadOp::create(*this, loc, ptr, /*isDeref=*/false, ``` https://github.com/llvm/llvm-project/pull/156521 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits