[PATCH] D76895: [mlir] Add exp2 conversion to llvm.intr.exp2
Aaron Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 26 16:52:48 PDT 2020
asmith created this revision.
Herald added subscribers: llvm-commits, Joonsoo, liufengdb, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, burmako, jpienaar, rriddle, mehdi_amini.
Herald added a project: LLVM.
asmith added a reviewer: ftynse.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D76895
Files:
mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
Index: mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
===================================================================
--- mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
+++ mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
@@ -1224,6 +1224,9 @@
struct ExpOpLowering : public VectorConvertToLLVMPattern<ExpOp, LLVM::ExpOp> {
using Super::Super;
};
+struct Exp2OpLowering : public VectorConvertToLLVMPattern<Exp2Op, LLVM::Exp2Op> {
+ using Super::Super;
+};
struct LogOpLowering : public VectorConvertToLLVMPattern<LogOp, LLVM::LogOp> {
using Super::Super;
};
@@ -2721,6 +2724,7 @@
DialectCastOpLowering,
DivFOpLowering,
ExpOpLowering,
+ Exp2OpLowering,
LogOpLowering,
Log10OpLowering,
Log2OpLowering,
Index: mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
===================================================================
--- mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
+++ mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
@@ -923,6 +923,14 @@
let summary = "base-e exponential of the specified value";
}
+//===----------------------------------------------------------------------===//
+// ExpOp
+//===----------------------------------------------------------------------===//
+
+def Exp2Op : FloatUnaryOp<"exp2"> {
+ let summary = "base-2 exponential of the specified value";
+}
+
//===----------------------------------------------------------------------===//
// ExtractElementOp
//===----------------------------------------------------------------------===//
Index: mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
===================================================================
--- mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
+++ mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
@@ -771,6 +771,7 @@
def LLVM_CopySignOp : LLVM_BinarySameArgsIntrinsicOp<"copysign">;
def LLVM_CosOp : LLVM_UnaryIntrinsicOp<"cos">;
def LLVM_ExpOp : LLVM_UnaryIntrinsicOp<"exp">;
+def LLVM_Exp2Op : LLVM_UnaryIntrinsicOp<"exp2">;
def LLVM_FAbsOp : LLVM_UnaryIntrinsicOp<"fabs">;
def LLVM_FCeilOp : LLVM_UnaryIntrinsicOp<"ceil">;
def LLVM_FMAOp : LLVM_TernarySameArgsIntrinsicOp<"fma">;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76895.253016.patch
Type: text/x-patch
Size: 2167 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200326/b6cef258/attachment.bin>
More information about the llvm-commits
mailing list