Skip to content

Commit f1fe6a2

Browse files
committed
[mlir][ArmSVE] add zip1 intrinsic
1 parent b0763a1 commit f1fe6a2

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

mlir/include/mlir/Dialect/ArmSVE/IR/ArmSVE.td

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,4 +410,8 @@ def ConvertToSvboolIntrOp :
410410
/*overloadedResults=*/[]>,
411411
Arguments<(ins SVEPredicate:$mask)>;
412412

413+
def Zip1IntrOp :
414+
ArmSVE_IntrBinaryOverloadedOp<"zip1">,
415+
Arguments<(ins AnyScalableVector, AnyScalableVector)>;
416+
413417
#endif // ARMSVE_OPS

mlir/test/Target/LLVMIR/arm-sve.mlir

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,3 +314,10 @@ llvm.func @arm_sve_convert_to_svbool(
314314
: (vector<[1]xi1>) -> vector<[16]xi1>
315315
llvm.return
316316
}
317+
318+
// CHECK-LABEL: @arm_sve_zip1
319+
// CHECK-NEXT: call <vscale x 8 x half> @llvm.aarch64.sve.zip1.nxv8f16(<vscale x 8 x half> %{{.*}}, <vscale x 8 x half> {{.*}})
320+
llvm.func @arm_sve_zip1(%arg0 : vector<[8]xf16>) -> vector<[8]xf16> {
321+
%0 = "arm_sve.intr.zip1"(%arg0, %arg0) : (vector<[8]xf16>, vector<[8]xf16>) -> vector<[8]xf16>
322+
llvm.return %0 : vector<[8]xf16>
323+
}

0 commit comments

Comments
 (0)