[PATCH] D73470: [mlir] fixed invalid LLVM intrinsics in LLVMOPs.td and llvmir-intrinsics.mlir.
Julian Gross via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 28 02:05:47 PST 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG88d6f18225e1: [mlir] fixed invalid LLVM intrinsics in LLVMOPs.td and llvmir-intrinsics.mlir. (authored by dfki-jugr).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73470/new/
https://reviews.llvm.org/D73470
Files:
mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
mlir/test/Target/llvmir-intrinsics.mlir
Index: mlir/test/Target/llvmir-intrinsics.mlir
===================================================================
--- mlir/test/Target/llvmir-intrinsics.mlir
+++ mlir/test/Target/llvmir-intrinsics.mlir
@@ -5,9 +5,9 @@
%c3 = llvm.mlir.constant(3 : i32) : !llvm.i32
%c1 = llvm.mlir.constant(1 : i32) : !llvm.i32
%c0 = llvm.mlir.constant(0 : i32) : !llvm.i32
- // CHECK: call float @llvm.fmuladd.f32.f32.f32
+ // CHECK: call float @llvm.fmuladd.f32
"llvm.intr.fmuladd"(%arg0, %arg1, %arg0) : (!llvm.float, !llvm.float, !llvm.float) -> !llvm.float
- // CHECK: call <8 x float> @llvm.fmuladd.v8f32.v8f32.v8f32
+ // CHECK: call <8 x float> @llvm.fmuladd.v8f32
"llvm.intr.fmuladd"(%arg2, %arg2, %arg2) : (!llvm<"<8 x float>">, !llvm<"<8 x float>">, !llvm<"<8 x float>">) -> !llvm<"<8 x float>">
// CHECK: call void @llvm.prefetch.p0i8(i8* %3, i32 0, i32 3, i32 1)
"llvm.intr.prefetch"(%arg3, %c0, %c3, %c1) : (!llvm<"i8*">, !llvm.i32, !llvm.i32, !llvm.i32) -> ()
@@ -87,8 +87,8 @@
}
// Check that intrinsics are declared with appropriate types.
-// CHECK: declare float @llvm.fmuladd.f32.f32.f32(float, float, float)
-// CHECK: declare <8 x float> @llvm.fmuladd.v8f32.v8f32.v8f32(<8 x float>, <8 x float>, <8 x float>) #0
+// CHECK: declare float @llvm.fmuladd.f32(float, float, float)
+// CHECK: declare <8 x float> @llvm.fmuladd.v8f32(<8 x float>, <8 x float>, <8 x float>) #0
// CHECK: declare void @llvm.prefetch.p0i8(i8* nocapture readonly, i32 immarg, i32 immarg, i32)
// CHECK: declare float @llvm.exp.f32(float)
// CHECK: declare <8 x float> @llvm.exp.v8f32(<8 x float>) #0
@@ -104,3 +104,4 @@
// CHECK: declare <8 x float> @llvm.ceil.v8f32(<8 x float>) #0
// CHECK: declare float @llvm.cos.f32(float)
// CHECK: declare <8 x float> @llvm.cos.v8f32(<8 x float>) #0
+// CHECK: declare float @llvm.copysign.f32(float, float)
Index: mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
===================================================================
--- mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
+++ mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
@@ -654,30 +654,30 @@
"{$in->getType()}), {$in});"> {
}
-class LLVM_BinaryIntrinsicOp<string func, list<OpTrait> traits = []> :
+class LLVM_BinarySameArgsIntrinsicOp<string func, list<OpTrait> traits = []> :
LLVM_OneResultOp<"intr." # func,
!listconcat([NoSideEffect, SameOperandsAndResultType], traits)>,
Arguments<(ins LLVM_Type:$a, LLVM_Type:$b)>,
LLVM_Builder<"$res = builder.CreateCall(llvm::Intrinsic::getDeclaration("
"builder.GetInsertBlock()->getModule(), llvm::Intrinsic::" # func # ","
- "{$a->getType(), $b->getType()}), {$a, $b});"> {
+ "{$a->getType()}), {$a, $b});"> {
}
-class LLVM_TernaryIntrinsicOp<string func, list<OpTrait> traits = []> :
+class LLVM_TernarySameArgsIntrinsicOp<string func, list<OpTrait> traits = []> :
LLVM_OneResultOp<"intr." # func,
!listconcat([NoSideEffect, SameOperandsAndResultType], traits)>,
Arguments<(ins LLVM_Type:$a, LLVM_Type:$b, LLVM_Type:$c)>,
LLVM_Builder<"$res = builder.CreateCall(llvm::Intrinsic::getDeclaration("
"builder.GetInsertBlock()->getModule(), llvm::Intrinsic::" # func # ","
- "{$a->getType(), $b->getType(), $c->getType()}), {$a, $b, $c});"> {
+ "{$a->getType()}), {$a, $b, $c});"> {
}
def LLVM_ExpOp : LLVM_UnaryIntrinsicOp<"exp">;
def LLVM_FAbsOp : LLVM_UnaryIntrinsicOp<"fabs">;
def LLVM_FCeilOp : LLVM_UnaryIntrinsicOp<"ceil">;
def LLVM_CosOp : LLVM_UnaryIntrinsicOp<"cos">;
-def LLVM_CopySignOp : LLVM_BinaryIntrinsicOp<"copysign">;
-def LLVM_FMulAddOp : LLVM_TernaryIntrinsicOp<"fmuladd">;
+def LLVM_CopySignOp : LLVM_BinarySameArgsIntrinsicOp<"copysign">;
+def LLVM_FMulAddOp : LLVM_TernarySameArgsIntrinsicOp<"fmuladd">;
def LLVM_LogOp : LLVM_Op<"intr.log", [NoSideEffect]>,
Arguments<(ins LLVM_Type:$in)>,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73470.240808.patch
Type: text/x-patch
Size: 3889 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200128/34196bbb/attachment.bin>
More information about the llvm-commits
mailing list