================
@@ -460,6 +460,28 @@ mlir::LogicalResult
CIRToLLVMAssumeOpLowering::matchAndRewrite(
return mlir::success();
}
+mlir::LogicalResult CIRToLLVMAssumeAlignedOpLowering::matchAndRewrite(
+ cir::AssumeAlignedOp op, OpAdaptor adaptor,
+ mlir::ConversionPatternRewriter &rewriter) const {
+ SmallVector<mlir::Value, 3> opBundleArgs{adaptor.getPointer()};
+
+ auto alignment = rewriter.create<mlir::LLVM::ConstantOp>(
+ op.getLoc(), rewriter.getI64Type(), op.getAlignment());
----------------
andykaylor wrote:
I was hoping that using the adaptor would save a round trip on the attribute
creation (because `getAlignment()` returns a literal value which is then
converted back to an attribute by the `ConstantOp` builder), but after closer
inspection it doesn't look like it does. However, I think maybe using
`getAlignmentAttr()` with either `op` or `adaptor` would work.
https://github.com/llvm/llvm-project/pull/152152
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits