[PATCH] D151492: Add fastmath attributes to llvm.call_intrinsic

Jeff Niu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 25 13:50:04 PDT 2023


Mogball added inline comments.


================
Comment at: mlir/include/mlir/Dialect/LLVMIR/LLVMIntrinsicOps.td:870
 
-def LLVM_CallIntrinsicOp : LLVM_Op<"call_intrinsic"> {
+def LLVM_CallIntrinsicOp : LLVM_Op<"call_intrinsic", [DeclareOpInterfaceMethods<FastmathFlagsInterface>]> {
   let summary = "Call to an LLVM intrinsic function.";
----------------
please fit this definition into 80 characters wide


================
Comment at: mlir/lib/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.cpp:98
 static LogicalResult
 convertCallLLVMIntrinsicOp(CallIntrinsicOp &op, llvm::IRBuilderBase &builder,
                            LLVM::ModuleTranslation &moduleTranslation) {
----------------
I think the problem with the cast below is that this is passed by reference. You should not pass operation handles by reference.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151492/new/

https://reviews.llvm.org/D151492



More information about the cfe-commits mailing list